secure-spreadsheet 981 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env sh
  2. # Support bash to support `source` with fallback on $0 if this does not run with bash
  3. # https://stackoverflow.com/a/35006505/6512
  4. selfArg="$BASH_SOURCE"
  5. if [ -z "$selfArg" ]; then
  6. selfArg="$0"
  7. fi
  8. self=$(realpath $selfArg 2> /dev/null)
  9. if [ -z "$self" ]; then
  10. self="$selfArg"
  11. fi
  12. dir=$(cd "${self%[/\\]*}" > /dev/null; cd '../nick322/secure-spreadsheet' && pwd)
  13. if [ -d /proc/cygdrive ]; then
  14. case $(which php) in
  15. $(readlink -n /proc/cygdrive)/*)
  16. # We are in Cygwin using Windows php, so the path must be translated
  17. dir=$(cygpath -m "$dir");
  18. ;;
  19. esac
  20. fi
  21. export COMPOSER_RUNTIME_BIN_DIR="$(cd "${self%[/\\]*}" > /dev/null; pwd)"
  22. # If bash is sourcing this file, we have to source the target as well
  23. bashSource="$BASH_SOURCE"
  24. if [ -n "$bashSource" ]; then
  25. if [ "$bashSource" != "$0" ]; then
  26. source "${dir}/secure-spreadsheet" "$@"
  27. return
  28. fi
  29. fi
  30. "${dir}/secure-spreadsheet" "$@"