Fix portzap-install
This commit is contained in:
parent
a9a5aba7eb
commit
38994b0e7c
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue