Improve exclusion logic in find
command
This commit is contained in:
parent
7f9503e715
commit
a6c7ab818a
1 changed files with 8 additions and 7 deletions
|
@ -5,7 +5,6 @@
|
||||||
gitdir=$1
|
gitdir=$1
|
||||||
installdir=$2
|
installdir=$2
|
||||||
revfile=$3
|
revfile=$3
|
||||||
artifacts=".git .gitignore .hooks .arcconfig"
|
|
||||||
libexec="/usr/local/libexec/portzap"
|
libexec="/usr/local/libexec/portzap"
|
||||||
mode="u=rwX,g=rwX,o="
|
mode="u=rwX,g=rwX,o="
|
||||||
|
|
||||||
|
@ -39,12 +38,14 @@ perform_install()
|
||||||
{
|
{
|
||||||
find -s . \
|
find -s . \
|
||||||
-maxdepth 1 \
|
-maxdepth 1 \
|
||||||
-exec cp -Rfv {} "${installdir}" \; \
|
! -name "." \
|
||||||
-exec chown -R root:_portzap "${installdir}/{}" \; \
|
! -name ".git" \
|
||||||
-exec chmod -R ${mode} "${installdir}/{}" \;
|
! -name ".gitignore" \
|
||||||
for path in ${artifacts}; do
|
! -name ".hooks" \
|
||||||
rm -rf "${installdir:?}/${path}"
|
! -name ".arcconfig" \
|
||||||
done
|
-exec cp -Rfv {} "${installdir}" \;
|
||||||
|
chown -Rv root:_portzap "${installdir}"
|
||||||
|
chmod -Rv "${mode}" "${installdir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
run_install()
|
run_install()
|
||||||
|
|
Loading…
Reference in a new issue