[projects/cleanbuild] make cleanbuild wrapper symlinkable
glen
glen at pld-linux.org
Sun Aug 12 21:23:49 CEST 2018
commit b9e929631b8bbd386577d4dd35aaed6b26a2d75e
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Thu Jul 19 20:55:58 2018 +0300
make cleanbuild wrapper symlinkable
cleanbuild | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/cleanbuild b/cleanbuild
index 0e99905..af431e5 100755
--- a/cleanbuild
+++ b/cleanbuild
@@ -1,9 +1,14 @@
#!/bin/sh
-dir=$(dirname "$0")
+set -e
-[ -r .cleanbuildrc ] && . ./.cleanbuildrc
+program=$(readlink -f "$0")
+dir=$(dirname "$program")
+
+cd "$dir"
+
+[ -r .cleanbuildrc ] && . .cleanbuildrc
# backend to use: vserver or docker
BACKEND=${BACKEND:-docker}
-exec $dir/cleanbuild-$BACKEND.sh "$@"
+exec ./cleanbuild-$BACKEND.sh "$@"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/cleanbuild.git/commitdiff/192b0a3789c5e17dd1c0c6376b806588ca86420a
More information about the pld-cvs-commit
mailing list