From f08fec0a86cf46c3af30b34585b3fce86e2cf5a2 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Wed, 17 Apr 2024 13:22:00 -0300 Subject: [PATCH] Set umask. Expand permissions for _portzap group members --- libexec/portzap/portzap-clone | 2 +- libexec/portzap/portzap-install | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libexec/portzap/portzap-clone b/libexec/portzap/portzap-clone index 64251f4..4ac9845 100755 --- a/libexec/portzap/portzap-clone +++ b/libexec/portzap/portzap-clone @@ -12,7 +12,7 @@ if [ -e "${gitdir}/.git" ]; then echo "Try 'portzap pull' instead." exit 1 fi -umask u=rwX,g=rX,o= +umask u=rwX,g=rwX,o= set -x git clone "${giturl}" "${gitdir}" cd "${gitdir}" diff --git a/libexec/portzap/portzap-install b/libexec/portzap/portzap-install index 6294739..4c24526 100755 --- a/libexec/portzap/portzap-install +++ b/libexec/portzap/portzap-install @@ -7,7 +7,6 @@ installdir=$2 revfile=$3 localbase="${LOCALBASE:-/usr/local}" libexec="${localbase}/libexec/portzap" -mode="u=rwX,g=rwX,o=" ## # functions @@ -42,18 +41,19 @@ perform_install() ! -name ".gitignore" \ ! -name ".hooks" \ ! -name ".arcconfig" \ - -exec cp -Rfv {} "${installdir}" \; - chown -Rv root:_portzap "${installdir}" - chmod -Rv "${mode}" "${installdir}" + -exec cp -Rpv {} "${installdir}" \; + set -x + chown -R root "${installdir}" } run_install() { - install -o root -g _portzap -m "${mode}" -v "$@" + install -o root -g _portzap -v "$@" } ## # main +umask u=rwX,g=rwX,o= cd "${gitdir}" run_install "-d" "${installdir}" if [ -e "${revfile}" ]; then