env-go 305 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # env-go - Setup Go development environment variables
  3. if [ "$0" == "env-go" ]; then
  4. PATH_SCRIPT="."
  5. else
  6. PATH_SCRIPT=${0/%\/env-go}
  7. fi
  8. CURRENT_PATH=`pwd`
  9. cd $PATH_SCRIPT
  10. PATH_SCRIPT=`pwd`
  11. cd $PATH_SCRIPT
  12. . ./go.env
  13. cd $CURRENT_PATH
  14. if [ "$1" == "" ]; then
  15. bash
  16. else
  17. $*
  18. fi