diff --git a/libexec/sourcezap/utils/git-changed-files b/libexec/sourcezap/utils/git-changed-files index 16b948c..6a84d79 100755 --- a/libexec/sourcezap/utils/git-changed-files +++ b/libexec/sourcezap/utils/git-changed-files @@ -3,18 +3,16 @@ set -e ## # variables -localbase=${LOCALBASE:-/usr/local} -git="${localbase}"/bin/git +localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)} +libexec="${localbase}"/libexec/sourcezap gitdir=$1 commit=$2 -mode=u=rwX,g=rX,o= ## # functions gitexec() { - doas -n -u _sourcezap \ - /bin/sh -c "umask ${mode}; ${git} ${1}" + "${libexec}"/utils/gitexec "${1}" } ## diff --git a/libexec/sourcezap/utils/git-removed-files b/libexec/sourcezap/utils/git-removed-files index 6603ff1..21ff236 100755 --- a/libexec/sourcezap/utils/git-removed-files +++ b/libexec/sourcezap/utils/git-removed-files @@ -3,18 +3,16 @@ set -e ## # variables -localbase=${LOCALBASE:-/usr/local} -git="${localbase}"/bin/git +localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)} +libexec="${localbase}"/libexec/sourcezap gitdir=$1 commit=$2 -mode=u=rwX,g=rX,o= ## # functions gitexec() { - doas -n -u _sourcezap \ - /bin/sh -c "umask ${mode}; ${git} ${1}" + "${libexec}"/utils/gitexec "${1}" } ## diff --git a/libexec/sourcezap/utils/git-rev b/libexec/sourcezap/utils/git-rev index 48e1cdb..d025ecf 100755 --- a/libexec/sourcezap/utils/git-rev +++ b/libexec/sourcezap/utils/git-rev @@ -3,16 +3,15 @@ set -e ## # variables -git=/usr/local/bin/git +localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)} +libexec="${localbase}"/libexec/sourcezap gitdir=$1 -mode=u=rwX,g=rX,o= ## # functions gitexec() { - doas -n -u _sourcezap \ - /bin/sh -c "umask ${mode}; ${git} ${1}" + "${libexec}"/utils/gitexec "${1}" } ##