Exclude dirs: ".git", ".hooks"

Exclude files: ".gitignore", ".arcconfig"

This change is a follow up to the previous commit that didn't work
as intended.
This commit is contained in:
0x1eef 2023-01-22 19:34:07 -03:00
parent 2775e5f923
commit ace1ebb463
2 changed files with 13 additions and 3 deletions

View file

@ -104,7 +104,7 @@ install() {
exit 1 exit 1
fi fi
cd $portzap_dir cd $portzap_dir
find -E -s . -regex .+[^\.git] -regex .+[^\.hooks] -maxdepth 1 -type d \ find -s . -maxdepth 1 -type d \
-exec $libexec_dir/install-directory $ports_dir $libexec_dir {} + -exec $libexec_dir/install-directory $ports_dir $libexec_dir {} +
} }

View file

@ -7,6 +7,16 @@ for i in $(seq 3 $#); do
dir=$(eval echo -n \${$i}) dir=$(eval echo -n \${$i})
install -d -g $group -m $mode $src $dest/$dir install -d -g $group -m $mode $src $dest/$dir
echo Install $(realpath $dest/$dir) echo Install $(realpath $dest/$dir)
find $dir -maxdepth 1 -type f -exec $libexec_dir/install-file $dest/$dir {} +
find -s $dir -depth 1 -type d -exec $libexec_dir/install-directory $dest $libexec_dir {} \; # Install files
find $dir -maxdepth 1 -type f \
\( -not -name ".gitignore" \) \
\( -not -name ".arcconfig" \) \
-exec $libexec_dir/install-file $dest/$dir {} +
# Install subdirs (recursive)
find -s $dir -depth 1 -type d \
\( -not -name ".git" \) \
\( -not -name ".hooks" \) \
-exec $libexec_dir/install-directory $dest $libexec_dir {} \;
done done