https://github.com/daid/Cura/issues/37 package.sh does not run correctly when current directory is not script directory

master
Lawrence Johnston 2012-04-07 13:28:43 -07:00
parent 53aa2efd71
commit a055b03422
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,11 @@ function checkTool
# Actual build script
#############################
# Change working directory to the directory the script is in
# http://stackoverflow.com/a/246128
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
checkTool git "git: http://git-scm.com/"
checkTool curl "curl: http://curl.haxx.se/"
if [ $BUILD_TARGET = "win32" ]; then