Skip to content

Instantly share code, notes, and snippets.

@mitchellh
Created March 25, 2012 16:32
Show Gist options
  • Save mitchellh/2198107 to your computer and use it in GitHub Desktop.
Save mitchellh/2198107 to your computer and use it in GitHub Desktop.
# Get the directory where this script is. This will also resolve
# any symlinks in the directory/script, so it will be the fully
# resolved path.
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Useful variables
EMBEDDED_DIR=${DIR}/../embedded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment