From 56db2173dcaaf558d2db20294b825305a3c651df Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Mon, 8 Apr 2024 15:44:55 -0300 Subject: [PATCH] Update portzap-install --- libexec/portzap/portzap-install | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/libexec/portzap/portzap-install b/libexec/portzap/portzap-install index 710ccad..06f4990 100755 --- a/libexec/portzap/portzap-install +++ b/libexec/portzap/portzap-install @@ -22,18 +22,22 @@ perform_update() done for file in ${add}; do target="${installdir}/${file}" + parent=$(dirname "${target}") + if [ ! -e ${parent} ]; then + mkdir -p ${parent} + fi cp "${file}" "${target}" chown root:_portzap "${target}" - chmod u=rw,g=rw,o= "${target}" + chown root:_portzap "${parent}" done } perform_install() { - find -s . -maxdepth 1 \ + find -s . \ + -maxdepth 1 \ -exec cp -Rfv {} "${installdir}" \; \ - -exec chown -R root:_portzap "${installdir}/{}" \; \ - -exec chmod -R u=rwX,g=rwX,o= "${installdir}/{}" \; + -exec chown -R root:_portzap "${installdir}/{}" \; for path in ${artifacts}; do rm -rf "${installdir}/${path}" done @@ -41,6 +45,7 @@ perform_install() ## # main +umask u=rwX,g=rwX,o= cd "${gitdir}" if [ -e "${revfile}" ]; then perform_update