From f77f0fef7182a9757ad26091967a4e19039043ec Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 4 Oct 2016 04:01:20 +0200 Subject: Support to execute scripts without /root/bin in PATH --- buildfile | 2 +- check-repo | 2 +- prepare-repository | 2 +- renew-config | 2 +- settings.sh | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/buildfile b/buildfile index f0c278c..a3d506a 100755 --- a/buildfile +++ b/buildfile @@ -1,6 +1,6 @@ #!/bin/sh -. settings.sh +. $(dirname $0)/settings.sh $BINDIR/prepare-repository verbose=0 diff --git a/check-repo b/check-repo index 2cdf7bb..54aea2f 100755 --- a/check-repo +++ b/check-repo @@ -1,6 +1,6 @@ #!/bin/sh -. settings.sh +. $(dirname $0)/settings.sh DIR="$(mktemp -d)" trap 'rm -rf "${DIR}"' EXIT INT TERM HUP diff --git a/prepare-repository b/prepare-repository index c418699..c9beb40 100755 --- a/prepare-repository +++ b/prepare-repository @@ -1,6 +1,6 @@ #/bin/sh -. settings.sh +. $(dirname $0)/settings.sh DIR="$REPO" if [ -n "$1" -a -d "$1" ]; then diff --git a/renew-config b/renew-config index 5ed1b2d..7544e50 100755 --- a/renew-config +++ b/renew-config @@ -1,6 +1,6 @@ #!/bin/sh -. settings.sh +. $(dirname $0)/settings.sh echo "Checking repository. Please wait..." cd "$REPO" >/dev/null diff --git a/settings.sh b/settings.sh index 0f1523c..0525381 100644 --- a/settings.sh +++ b/settings.sh @@ -2,6 +2,7 @@ REPO="/root/repo" REAL="/var/lib/bcfg2" OLDPWD="$(pwd)" BINDIR="$( cd -P "$( dirname -- "$0" )" >/dev/null && pwd )" +PATH="$HOME/bin:$PATH" error() { echo "$@" 1>&2 -- cgit v1.2.3-1-g7c22