Created
February 19, 2010 07:54
-
-
Save BiosElement/308536 to your computer and use it in GitHub Desktop.
Bash: Find path to script location.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #========================== | |
| # bash - find path to script | |
| #========================== | |
| abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")" | |
| # to get the path only - not the script name - add | |
| path_only=`dirname "$abspath"` | |
| echo $path_only | |
| #Actual Syntensity Launch | |
| cd ${path_only} | |
| ./cbuild/src/client/Intensity_CClient -r $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment