Created
February 2, 2011 21:22
-
-
Save ashee/808468 to your computer and use it in GitHub Desktop.
This file contains 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
SCRIPT="$(basename "$(test -L "$0" && readlink "$0" || echo "$0")")" | |
BASEDIR=$(cd `dirname $0` && pwd) | |
BASEDIRNAME=$(basename $BASEDIR | tr \\n \ | sed -e 's/ $//' ) | |
# BASEDIRNAME can now be used e.g. to create a tarball | |
tar cvzf "${BASEDIRNAME}.tgz" target/* | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment