From: Lawrence Johnston Date: Sat, 7 Apr 2012 20:28:43 +0000 (-0700) Subject: https://github.com/daid/Cura/issues/37 package.sh does not run correctly when current... X-Git-Tag: RC3~92^2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a055b03422e972b285d65eeaf02cd9a6f3fe8084;p=cura.git https://github.com/daid/Cura/issues/37 package.sh does not run correctly when current directory is not script directory --- diff --git a/package.sh b/package.sh index 2a9038ae..d059f665 100755 --- a/package.sh +++ b/package.sh @@ -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