Add libexec/portzap/utils/gitexec
This commit is contained in:
parent
f4c45cd481
commit
7bf64d5abc
7 changed files with 25 additions and 24 deletions
|
@ -5,8 +5,6 @@ set -e
|
|||
# variables
|
||||
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||
libexec="${localbase}"/libexec/portzap
|
||||
git=$(which git)
|
||||
mode=u=rwX,g=rX,o=
|
||||
gitdir="$1"
|
||||
branch="$2"
|
||||
|
||||
|
@ -14,8 +12,7 @@ branch="$2"
|
|||
# functions
|
||||
gitexec()
|
||||
{
|
||||
doas -n -u _portzap \
|
||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
||||
"${libexec}"/utils/gitexec "${1}"
|
||||
}
|
||||
|
||||
printok() {
|
||||
|
|
|
@ -5,8 +5,6 @@ set -e
|
|||
# variables
|
||||
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||
libexec="${localbase}"/libexec/portzap
|
||||
git=$(which git)
|
||||
mode=u=rwX,g=rX,o=
|
||||
giturl=$1
|
||||
gitdir=$2
|
||||
branch=$3
|
||||
|
@ -15,8 +13,7 @@ branch=$3
|
|||
# functions
|
||||
gitexec()
|
||||
{
|
||||
doas -n -u _portzap \
|
||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
||||
"${libexec}"/utils/gitexec "${1}"
|
||||
}
|
||||
|
||||
printok() {
|
||||
|
|
|
@ -5,16 +5,13 @@ set -e
|
|||
# variables
|
||||
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||
libexec="${localbase}"/libexec/portzap
|
||||
git=$(which git)
|
||||
mode=u=rwX,g=rX,o=
|
||||
gitdir=$1
|
||||
|
||||
##
|
||||
# functions
|
||||
gitexec()
|
||||
{
|
||||
doas -n -u _portzap \
|
||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
||||
"${libexec}"/utils/gitexec "${1}"
|
||||
}
|
||||
|
||||
printok() {
|
||||
|
|
|
@ -3,8 +3,8 @@ set -e
|
|||
|
||||
##
|
||||
# variables
|
||||
git=$(which git)
|
||||
mode=u=rwX,g=rX,o=
|
||||
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||
libexec="${localbase}"/libexec/portzap
|
||||
gitdir=$1
|
||||
commit=$2
|
||||
|
||||
|
@ -12,8 +12,7 @@ commit=$2
|
|||
# functions
|
||||
gitexec()
|
||||
{
|
||||
doas -n -u _portzap \
|
||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
||||
"${libexec}"/utils/gitexec "${1}"
|
||||
}
|
||||
|
||||
##
|
||||
|
|
|
@ -3,8 +3,8 @@ set -e
|
|||
|
||||
##
|
||||
# variables
|
||||
git=$(which git)
|
||||
mode=u=rwX,g=rX,o=
|
||||
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||
libexec="${localbase}"/libexec/portzap
|
||||
gitdir=$1
|
||||
commit=$2
|
||||
|
||||
|
@ -12,8 +12,7 @@ commit=$2
|
|||
# functions
|
||||
gitexec()
|
||||
{
|
||||
doas -n -u _portzap \
|
||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
||||
"${libexec}"/utils/gitexec "${1}"
|
||||
}
|
||||
|
||||
##
|
||||
|
|
|
@ -3,16 +3,15 @@ set -e
|
|||
|
||||
##
|
||||
# variables
|
||||
git=$(which git)
|
||||
mode=u=rwX,g=rX,o=
|
||||
localbase=${LOCALBASE:-$(realpath "$(dirname "$0")"/../../..)}
|
||||
libexec="${localbase}"/libexec/portzap
|
||||
gitdir=$1
|
||||
|
||||
##
|
||||
# functions
|
||||
gitexec()
|
||||
{
|
||||
doas -n -u _portzap \
|
||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
||||
"${libexec}"/utils/gitexec "${1}"
|
||||
}
|
||||
|
||||
##
|
||||
|
|
13
libexec/portzap/utils/gitexec
Normal file
13
libexec/portzap/utils/gitexec
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
##
|
||||
# variables
|
||||
git=$(which git)
|
||||
mode=u=rwx,g=rx,o=
|
||||
|
||||
##
|
||||
# main
|
||||
doas -n \
|
||||
-u _portzap \
|
||||
/bin/sh -c "umask ${mode}; ${git} ${1}"
|
Loading…
Reference in a new issue