From 43168585f043455cea7dbfdc1007ee7d3ba93912 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Wed, 22 May 2024 22:16:03 -0300 Subject: [PATCH] Add consistent ${libexec} assignment logic --- libexec/portzap/portzap-checkout | 2 +- libexec/portzap/portzap-clone | 2 +- libexec/portzap/portzap-install | 6 ++++-- libexec/portzap/portzap-pull | 4 ++-- libexec/portzap/portzap-rm | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libexec/portzap/portzap-checkout b/libexec/portzap/portzap-checkout index 54c62b6..a18a6f2 100644 --- a/libexec/portzap/portzap-checkout +++ b/libexec/portzap/portzap-checkout @@ -3,8 +3,8 @@ set -e ## # variables -libexec=$(dirname "$0") localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../..)} +libexec="${localbase}"/libexec/portzap git="${localbase}"/bin/git mode="u=rwX,g=rX,o=" gitdir="$1" diff --git a/libexec/portzap/portzap-clone b/libexec/portzap/portzap-clone index 9b97c16..48971c2 100755 --- a/libexec/portzap/portzap-clone +++ b/libexec/portzap/portzap-clone @@ -4,7 +4,7 @@ set -e ## # variables localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../..)} -libexec=$(dirname "$0") +libexec="${localbase}"/libexec/portzap git="${localbase}"/bin/git giturl=$1 gitdir=$2 diff --git a/libexec/portzap/portzap-install b/libexec/portzap/portzap-install index 32bcd49..6f22788 100755 --- a/libexec/portzap/portzap-install +++ b/libexec/portzap/portzap-install @@ -3,11 +3,13 @@ set -e ## # variables +localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../..)} +libexec="${localbase}"/libexec/portzap +mode="u=rwX,g=rX,o=" gitdir=$1 installdir=$2 revfile=$3 -libexec=$(dirname "$0") -mode="u=rwX,g=rX,o=" + ## # functions diff --git a/libexec/portzap/portzap-pull b/libexec/portzap/portzap-pull index 6814326..9600d12 100755 --- a/libexec/portzap/portzap-pull +++ b/libexec/portzap/portzap-pull @@ -3,11 +3,11 @@ set -e ## # variables -libexec=$(dirname "$0") localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../..)} +libexec="${localbase}"/libexec/portzap git="${localbase}"/bin/git -gitdir=$1 mode="u=rwX,g=rX,o=" +gitdir=$1 ## # functions diff --git a/libexec/portzap/portzap-rm b/libexec/portzap/portzap-rm index 18c869e..d6e929c 100644 --- a/libexec/portzap/portzap-rm +++ b/libexec/portzap/portzap-rm @@ -3,7 +3,8 @@ set -e ## # variables -libexec=$(dirname "$0") +localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../..)} +libexec="${localbase}"/libexec/portzap gitdir=$1 installdir=$2