Browse Source

hack/make.sh: use SCRIPTDIR wherever possible

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Jörg Thalheim 10 years ago
parent
commit
23afce5f7f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      hack/make.sh

+ 2 - 2
hack/make.sh

@@ -24,6 +24,7 @@ set -e
 set -o pipefail
 set -o pipefail
 
 
 export DOCKER_PKG='github.com/docker/docker'
 export DOCKER_PKG='github.com/docker/docker'
+export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 
 # We're a nice, sexy, little shell script, and people might try to run us;
 # We're a nice, sexy, little shell script, and people might try to run us;
 # but really, they shouldn't. We want to be in a container!
 # but really, they shouldn't. We want to be in a container!
@@ -110,7 +111,7 @@ fi
 # Use these flags when compiling the tests and final binary
 # Use these flags when compiling the tests and final binary
 
 
 IAMSTATIC='true'
 IAMSTATIC='true'
-source "$(dirname "$BASH_SOURCE")/make/.go-autogen"
+source "$SCRIPTDIR/make/.go-autogen"
 LDFLAGS='-w'
 LDFLAGS='-w'
 
 
 LDFLAGS_STATIC='-linkmode external'
 LDFLAGS_STATIC='-linkmode external'
@@ -270,7 +271,6 @@ main() {
 		ln -sfT $VERSION bundles/latest
 		ln -sfT $VERSION bundles/latest
 	fi
 	fi
 
 
-	SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 	if [ $# -lt 1 ]; then
 	if [ $# -lt 1 ]; then
 		bundles=(${DEFAULT_BUNDLES[@]})
 		bundles=(${DEFAULT_BUNDLES[@]})
 	else
 	else