Update git-* utils
Default to a localbase path that is relative to the current file, and call git via utils/gitexec
This commit is contained in:
parent
1218164c9a
commit
a9f8daac78
3 changed files with 9 additions and 14 deletions
|
@ -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}"
|
||||
}
|
||||
|
||||
##
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
||||
##
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue