Skip to content

Instantly share code, notes, and snippets.

@kevonc
Created March 11, 2014 03:21
Show Gist options
  • Save kevonc/9478886 to your computer and use it in GitHub Desktop.
Save kevonc/9478886 to your computer and use it in GitHub Desktop.
bash script to find parent dir path
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE}" )/.." && pwd )"
@kevonc
Copy link
Author

kevonc commented Mar 11, 2014

this is assuming the file is in a dir of the project, ex: project_dir/script/this_file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment