run.sh 814 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env 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 [ ! -e /vagrant ]; then
  9. echo "The extended tests must be run on the Vagrant machine."
  10. exit 1
  11. fi
  12. if [ ! -f "$exa_binary" ]; then
  13. echo "exa binary ($exa_binary) does not exist"
  14. if [ "$1" != "--release" ]; then echo -e "create it first with \033[1;32mbuild-exa\033[0m or \033[1;32mb\033[0m"; fi
  15. exit 1
  16. fi
  17. echo -e "#!/bin/sh\nexec $exa_binary --colour=always \"\$@\"" > /tmp/exa
  18. chmod +x /tmp/exa
  19. export PATH="/tmp:$PATH"
  20. # Unset any environment variables
  21. export EXA_STRICT=""
  22. export EXA_DEBUG=""
  23. export LS_COLORS=""
  24. export EXA_COLORS=""
  25. # Run the tests
  26. exec specsheet $(dirname "$0")/*.toml -O cmd.shell=bash