From dd0e6c84d7520fe4e54bad167da04bebe512ec3e Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 19 Apr 2024 04:47:24 -0300 Subject: [PATCH] Replace '$rootdir' with '$localbase' --- bin/portzap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/portzap b/bin/portzap index 3925151..36b9caf 100755 --- a/bin/portzap +++ b/bin/portzap @@ -2,13 +2,13 @@ ## # variables -rootdir=$(dirname "$0") +localbase="${LOCALBASE:-/usr/local}" gitdir="/home/_portzap/ports" giturl="${PORTZAP_GITURL:-https://git.hardenedbsd.org/hardenedbsd/ports.git}" branch="${PORTZAP_BRANCH:-hardenedbsd/main}" installdir="${PORTZAP_INSTALLDIR:-/usr/ports}" revision="${installdir}/.portzap" -libexec=$(realpath "${rootdir}/../libexec/portzap") +libexec="${localbase}/libexec/portzap" ## # functions @@ -45,7 +45,7 @@ while [ "${i}" -le "$#" ]; do eval "_portzap_option=\$${i}" # shellcheck disable=SC2154 if [ "${_portzap_option}" = "-v" ]; then - cat "${rootdir}"/../share/portzap/VERSION + cat "${localbase}"/../share/portzap/VERSION exit 0 fi # shellcheck disable=SC2003