summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuildfile2
-rwxr-xr-xrenew-config2
-rw-r--r--settings.sh1
3 files changed, 3 insertions, 2 deletions
diff --git a/buildfile b/buildfile
index 963d706..d19d4eb 100755
--- a/buildfile
+++ b/buildfile
@@ -1,7 +1,7 @@
#!/bin/sh
. settings.sh
-$(dirname $0)/prepare-repository
+$BINDIR/prepare-repository
verbose=0
if [ "$1" = "-v" ]; then
diff --git a/renew-config b/renew-config
index 937025e..5536b0c 100755
--- a/renew-config
+++ b/renew-config
@@ -22,7 +22,7 @@ if [ -n "$(git rev-list HEAD..origin/master)" ]; then
fi
# update symlinks (needed for repo validation)
-$(dirname $0)/prepare-repository
+$BINDIR/prepare-repository
if ! bcfg2-lint -Q "$REPO"; then
error "$REPO: bcfg2-lint detected errors."
diff --git a/settings.sh b/settings.sh
index cf4bd70..f6bd566 100644
--- a/settings.sh
+++ b/settings.sh
@@ -1,6 +1,7 @@
REPO="/root/repo"
REAL="/var/lib/bcfg2"
OLDPWD="$(pwd)"
+BINDIR="$( cd -P "$( dirname "$0" )" >/dev/null && pwd )"
error() {
echo "$@" 1>&2