Browse code

hack/make.sh: use SCRIPTDIR wherever possible

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>

Jörg Thalheim authored on 2015/04/15 00:38:14
Showing 1 changed files
... ...
@@ -24,6 +24,7 @@ set -e
24 24
 set -o pipefail
25 25
 
26 26
 export DOCKER_PKG='github.com/docker/docker'
27
+export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
27 28
 
28 29
 # We're a nice, sexy, little shell script, and people might try to run us;
29 30
 # but really, they shouldn't. We want to be in a container!
... ...
@@ -110,7 +111,7 @@ fi
110 110
 # Use these flags when compiling the tests and final binary
111 111
 
112 112
 IAMSTATIC='true'
113
-source "$(dirname "$BASH_SOURCE")/make/.go-autogen"
113
+source "$SCRIPTDIR/make/.go-autogen"
114 114
 LDFLAGS='-w'
115 115
 
116 116
 LDFLAGS_STATIC='-linkmode external'
... ...
@@ -270,7 +271,6 @@ main() {
270 270
 		ln -sfT $VERSION bundles/latest
271 271
 	fi
272 272
 
273
-	SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
274 273
 	if [ $# -lt 1 ]; then
275 274
 		bundles=(${DEFAULT_BUNDLES[@]})
276 275
 	else