aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scripts/build-rootimage
diff options
context:
space:
mode:
authorReto Buerki <reet@codelabs.ch>2012-12-18 16:44:21 +0100
committerTobias Brunner <tobias@strongswan.org>2013-01-17 16:54:58 +0100
commitaafc0a179901c8a224e5e473cbab5f13ae7ad134 (patch)
treee3cb2296f0bcdec54eb73778111d49cf35f0dfc7 /testing/scripts/build-rootimage
parent0593b6c975684d61a7432c6593ef5a5a6bc7b21d (diff)
downloadstrongswan-aafc0a179901c8a224e5e473cbab5f13ae7ad134.tar.bz2
strongswan-aafc0a179901c8a224e5e473cbab5f13ae7ad134.tar.xz
Make test scripts callable from any path
Diffstat (limited to 'testing/scripts/build-rootimage')
-rwxr-xr-xtesting/scripts/build-rootimage6
1 files changed, 4 insertions, 2 deletions
diff --git a/testing/scripts/build-rootimage b/testing/scripts/build-rootimage
index ac9ee8bbc..8f2b3aa1c 100755
--- a/testing/scripts/build-rootimage
+++ b/testing/scripts/build-rootimage
@@ -16,7 +16,9 @@
echo "Building root image"
-. $PWD/scripts/function.sh
+DIR=$(dirname `readlink -f $0`)
+. $DIR/../testing.conf
+. $DIR/function.sh
[ `id -u` -eq 0 ] || die "You must be root to run $0"
[ -f "$BASEIMG" ] || die "Base image $BASEIMG not found"
@@ -52,7 +54,7 @@ do_on_exit rm -r $LOOPDIR/root/compile
do_on_exit umount $LOOPDIR/root/compile
echo "Installing software from source"
-RECPDIR=$PWD/scripts/recipes
+RECPDIR=$DIR/recipes
RECIPES=`ls $RECPDIR/*.mk | xargs -n1 basename`
execute "cp -r $RECPDIR/patches $LOOPDIR/root/compile" 0
for r in $RECIPES