From ae5893a6855c6cc3f0b60b4087779e82bae2c169 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 19 Apr 2024 05:23:28 -0300 Subject: [PATCH] Replace hard-coded references to /usr/local --- bin/portzap | 1 - libexec/portzap/git-changed-files | 3 ++- libexec/portzap/git-removed-files | 3 ++- libexec/portzap/portzap-clone | 3 ++- libexec/portzap/portzap-pull | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/portzap b/bin/portzap index 2d9a5e5..31f19f9 100755 --- a/bin/portzap +++ b/bin/portzap @@ -52,7 +52,6 @@ while [ "${i}" -le "$#" ]; do i=$(expr "${i}" + 1); done - case $1 in "clone") require_dependency "git doas" diff --git a/libexec/portzap/git-changed-files b/libexec/portzap/git-changed-files index a471ac4..63e41af 100644 --- a/libexec/portzap/git-changed-files +++ b/libexec/portzap/git-changed-files @@ -2,7 +2,8 @@ ## # variables -git=/usr/local/bin/git +localbase=${LOCALBASE:-/usr/local} +git="${localbase}"/bin/git gitdir=$1 commit=$2 diff --git a/libexec/portzap/git-removed-files b/libexec/portzap/git-removed-files index 2a399cf..7a4d09c 100644 --- a/libexec/portzap/git-removed-files +++ b/libexec/portzap/git-removed-files @@ -2,7 +2,8 @@ ## # variables -git=/usr/local/bin/git +localbase=${LOCALBASE:-/usr/local} +git="${localbase}"/bin/git gitdir=$1 commit=$2 diff --git a/libexec/portzap/portzap-clone b/libexec/portzap/portzap-clone index 0ff104a..59c0f7d 100755 --- a/libexec/portzap/portzap-clone +++ b/libexec/portzap/portzap-clone @@ -2,7 +2,8 @@ ## # variables -git=/usr/local/bin/git +localbase=${LOCALBASE:-/usr/local} +git="${localbase}"/bin/git giturl=$1 gitdir=$2 branch=$3 diff --git a/libexec/portzap/portzap-pull b/libexec/portzap/portzap-pull index 34d1c3e..8b62075 100755 --- a/libexec/portzap/portzap-pull +++ b/libexec/portzap/portzap-pull @@ -2,7 +2,8 @@ ## # variables -git=/usr/local/bin/git +localbase=${LOCALBASE:-/usr/local} +git="${localbase}"/bin/git gitdir=$1 branch=$2