diff --git a/libexec/portzap/portzap-install b/libexec/portzap/portzap-install index baff225..7f78104 100755 --- a/libexec/portzap/portzap-install +++ b/libexec/portzap/portzap-install @@ -7,6 +7,7 @@ installdir=$2 revfile=$3 artifacts=".git .gitignore .hooks .arcconfig" libexec=/usr/local/libexec/portzap +mode="u=rwX,g=rwX,o=" ## # functions @@ -25,10 +26,12 @@ perform_update() parent=$(dirname "${target}") if [ ! -e "${parent}" ]; then mkdir -p "${parent}" + chown root:_portzap "${parent}" + chmod ${mode} "${parent}" fi cp "${file}" "${target}" chown root:_portzap "${target}" - chown root:_portzap "${parent}" + chmod ${mode} "${target}" done } @@ -37,7 +40,8 @@ perform_install() find -s . \ -maxdepth 1 \ -exec cp -Rfv {} "${installdir}" \; \ - -exec chown -R root:_portzap "${installdir}/{}" \; + -exec chown -R root:_portzap "${installdir}/{}" \; \ + -exec chmod -R ${mode} "${installdir}/{}" \; for path in ${artifacts}; do rm -rf "${installdir:?}/${path}" done @@ -45,7 +49,6 @@ perform_install() ## # main -umask u=rwX,g=rwX,o= cd "${gitdir}" if [ -e "${revfile}" ]; then perform_update