run.sh 702 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. trap 'exit' ERR
  3. # Check for release mode
  4. case "$1" in
  5. "--release") exa_binary="$HOME/target/release/exa" ;;
  6. *) exa_binary="$HOME/target/debug/exa" ;;
  7. esac
  8. if [ ! -f "$exa_binary" ]; then
  9. echo "exa binary ($exa_binary) does not exist"
  10. if [ "$1" != "--release" ]; then echo -e "create it first with \033[1;32mbuild-exa\033[0m or \033[1;32mb\033[0m"; fi
  11. exit 1
  12. fi
  13. echo -e "#!/bin/sh\nexec $exa_binary --colour=always \"\$@\"" > /tmp/exa
  14. chmod +x /tmp/exa
  15. export PATH="/tmp:$PATH"
  16. # Unset any environment variables
  17. export EXA_STRICT=""
  18. export EXA_DEBUG=""
  19. export LS_COLORS=""
  20. export EXA_COLORS=""
  21. # Run the tests
  22. exec specsheet $(dirname "$0")/*.toml -O cmd.shell=bash