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
|
# variables
|
||||||
localbase=${LOCALBASE:-/usr/local}
|
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||||
git="${localbase}"/bin/git
|
libexec="${localbase}"/libexec/sourcezap
|
||||||
gitdir=$1
|
gitdir=$1
|
||||||
commit=$2
|
commit=$2
|
||||||
mode=u=rwX,g=rX,o=
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
gitexec()
|
||||||
{
|
{
|
||||||
doas -n -u _sourcezap \
|
"${libexec}"/utils/gitexec "${1}"
|
||||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -3,18 +3,16 @@ set -e
|
||||||
|
|
||||||
##
|
##
|
||||||
# variables
|
# variables
|
||||||
localbase=${LOCALBASE:-/usr/local}
|
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||||
git="${localbase}"/bin/git
|
libexec="${localbase}"/libexec/sourcezap
|
||||||
gitdir=$1
|
gitdir=$1
|
||||||
commit=$2
|
commit=$2
|
||||||
mode=u=rwX,g=rX,o=
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
gitexec()
|
||||||
{
|
{
|
||||||
doas -n -u _sourcezap \
|
"${libexec}"/utils/gitexec "${1}"
|
||||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -3,16 +3,15 @@ set -e
|
||||||
|
|
||||||
##
|
##
|
||||||
# variables
|
# variables
|
||||||
git=/usr/local/bin/git
|
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||||
|
libexec="${localbase}"/libexec/sourcezap
|
||||||
gitdir=$1
|
gitdir=$1
|
||||||
mode=u=rwX,g=rX,o=
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
gitexec()
|
gitexec()
|
||||||
{
|
{
|
||||||
doas -n -u _sourcezap \
|
"${libexec}"/utils/gitexec "${1}"
|
||||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in a new issue