Alternate mode syntax

This commit is contained in:
0x1eef 2024-04-20 00:28:10 -03:00
parent 318b893299
commit 5b363c9eac
3 changed files with 7 additions and 7 deletions

View file

@ -8,7 +8,7 @@ git="${localbase}"/bin/git
giturl=$1 giturl=$1
gitdir=$2 gitdir=$2
branch=$3 branch=$3
mode="u=rwX,g=rwX,o=" mode="ug=rwX,o="
## ##
# main # main
@ -24,7 +24,7 @@ if [ -e "${gitdir}/.git" ]; then
fi fi
set -x set -x
umask "${mode}" umask ${mode}
doas -u _portzap "${git}" clone "${giturl}" "${gitdir}" doas -u _portzap "${git}" clone "${giturl}" "${gitdir}"
cd "${gitdir}" cd "${gitdir}"
doas -u _portzap "${git}" config core.filemode off doas -u _portzap "${git}" config core.filemode off

View file

@ -6,7 +6,7 @@ gitdir=$1
installdir=$2 installdir=$2
revfile=$3 revfile=$3
libexec=$(dirname "$0") libexec=$(dirname "$0")
mode="u=rwX,g=rwX,o=" mode="ug=rwX,o="
## ##
# functions # functions
@ -64,11 +64,11 @@ if [ "$(id -u)" != "0" ]; then
fi fi
set -x set -x
umask "${mode}" umask ${mode}
cd "${gitdir}" cd "${gitdir}"
set +x set +x
run_install "-d" "${installdir}" run_install "-d" "${installdir}"
chmod u=rwx,g=rwx,o= "${installdir}" chmod ${mode} "${installdir}"
if [ -e "${revfile}" ]; then if [ -e "${revfile}" ]; then
perform_update perform_update
else else

View file

@ -7,7 +7,7 @@ localbase=${LOCALBASE:-/usr/local}
git="${localbase}"/bin/git git="${localbase}"/bin/git
gitdir=$1 gitdir=$1
branch=$2 branch=$2
mode="u=rwX,g=rwX,o=" mode="ug=rwX,o="
owner="_portzap:_portzap" owner="_portzap:_portzap"
## ##
@ -43,7 +43,7 @@ if [ ! -e "${gitdir}/.git" ]; then
exit 1 exit 1
fi fi
umask "${mode}" umask ${mode}
doas -u root /bin/chmod -R "${mode}" "${gitdir}/.git" doas -u root /bin/chmod -R "${mode}" "${gitdir}/.git"
doas -u root /usr/sbin/chown -R "${owner}" "${gitdir}/.git" doas -u root /usr/sbin/chown -R "${owner}" "${gitdir}/.git"
cd "${gitdir}" cd "${gitdir}"