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

View file

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

View file

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