From 6cde6f8ab633bc6ad10379b5986193213141f078 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Wed, 22 May 2024 21:49:35 -0300 Subject: [PATCH] Replace hard-coded references to /usr/local/ --- libexec/portzap/git-changed-files | 2 +- libexec/portzap/git-removed-files | 2 +- libexec/portzap/git-rev | 3 ++- libexec/portzap/portzap-checkout | 2 +- libexec/portzap/portzap-clone | 2 +- libexec/portzap/portzap-pull | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libexec/portzap/git-changed-files b/libexec/portzap/git-changed-files index adb53fc..82e7f98 100644 --- a/libexec/portzap/git-changed-files +++ b/libexec/portzap/git-changed-files @@ -3,7 +3,7 @@ set -e ## # variables -localbase=${LOCALBASE:-/usr/local} +localbase=${LOCALBASE:-$(realpath $(dirname $0)/../..)} git="${localbase}"/bin/git gitdir=$1 commit=$2 diff --git a/libexec/portzap/git-removed-files b/libexec/portzap/git-removed-files index 23209d9..ed42d83 100644 --- a/libexec/portzap/git-removed-files +++ b/libexec/portzap/git-removed-files @@ -3,7 +3,7 @@ set -e ## # variables -localbase=${LOCALBASE:-/usr/local} +localbase=${LOCALBASE:-$(realpath $(dirname $0)/../..)} git="${localbase}"/bin/git gitdir=$1 commit=$2 diff --git a/libexec/portzap/git-rev b/libexec/portzap/git-rev index eab8f9e..4e5466a 100644 --- a/libexec/portzap/git-rev +++ b/libexec/portzap/git-rev @@ -3,7 +3,8 @@ set -e ## # variables -git=/usr/local/bin/git +localbase=${LOCALBASE:-$(realpath $(dirname $0)/../..)} +git="${localbase}"/bin/git gitdir=$1 mode=u=rwX,g=rX,o= diff --git a/libexec/portzap/portzap-checkout b/libexec/portzap/portzap-checkout index 8fade8a..a05c7af 100644 --- a/libexec/portzap/portzap-checkout +++ b/libexec/portzap/portzap-checkout @@ -4,7 +4,7 @@ set -e ## # variables libexec=$(dirname "$0") -localbase=${LOCALBASE:-/usr/local} +localbase=${LOCALBASE:-$(realpath $(dirname $0)/../..)} 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 ad8511d..289b204 100755 --- a/libexec/portzap/portzap-clone +++ b/libexec/portzap/portzap-clone @@ -3,7 +3,7 @@ set -e ## # variables -localbase=${LOCALBASE:-/usr/local} +localbase=${LOCALBASE:-$(realpath $(dirname $0)/../..)} libexec=$(dirname "$0") git="${localbase}"/bin/git giturl=$1 diff --git a/libexec/portzap/portzap-pull b/libexec/portzap/portzap-pull index fc55a66..ffbc9eb 100755 --- a/libexec/portzap/portzap-pull +++ b/libexec/portzap/portzap-pull @@ -4,7 +4,7 @@ set -e ## # variables libexec=$(dirname "$0") -localbase=${LOCALBASE:-/usr/local} +localbase=${LOCALBASE:-$(realpath $(dirname $0)/../..)} git="${localbase}"/bin/git gitdir=$1 mode="u=rwX,g=rX,o="