diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-11-14 02:49:41 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2012-11-14 02:53:08 +0100 |
commit | 456de41b2fb0790f1b27d704ade798e1e7148b6c (patch) | |
tree | ef3accb38224097eb53010059f952b2df2658d61 | |
parent | 15f1f07a7f45a811382f44a083d5ecd471010b25 (diff) | |
download | bcfg2-tools-456de41b2fb0790f1b27d704ade798e1e7148b6c.tar.gz bcfg2-tools-456de41b2fb0790f1b27d704ade798e1e7148b6c.tar.bz2 bcfg2-tools-456de41b2fb0790f1b27d704ade798e1e7148b6c.zip |
renew-config: fix reference on $(dirname $0)
-rwxr-xr-x | buildfile | 2 | ||||
-rwxr-xr-x | renew-config | 2 | ||||
-rw-r--r-- | settings.sh | 1 |
3 files changed, 3 insertions, 2 deletions
@@ -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 |