libexec/portzap/install-directory is now recursive

This commit is contained in:
0x1eef 2023-01-20 22:53:31 -03:00
parent 98e88abfa8
commit c905c61fff
3 changed files with 7 additions and 20 deletions

View file

@ -109,9 +109,7 @@ install() {
exit 1
fi
cd $transient_dir
find . -maxdepth 1 -type f -exec install -g $group -m $install_mode {} $rest_dir \;
find . -maxdepth 1 -type d -exec $libexec_dir/install-directory {} $rest_dir/{} \;
find . -depth 2 -type d -exec $libexec_dir/install-port {} $rest_dir $install_mode $libexec_dir \;
find . -maxdepth 1 -type d -exec $libexec_dir/install-directory {} $rest_dir $libexec_dir \;
}
case $1 in

View file

@ -1,6 +1,11 @@
#!/bin/sh
src=$1
dest=$2
libexec_dir=$3
group=_portzap
mode=u=rwx,g=rx,o=
install -d -g $group -m $mode $src $dest
install -d -g $group -m $mode $src $dest/$src
echo Install $(realpath $dest/$src)
find $src -maxdepth 1 -type f -exec $libexec_dir/install-file {} $dest/$src $libexec_dir \;
find $src -depth 1 -type d -exec $libexec_dir/install-directory {} $dest $libexec_dir \;

View file

@ -1,16 +0,0 @@
#!/bin/sh
src=$1
dest=$2/${src}
mode=$3
libexec_dir=$4
group=_portzap
install_args="-m $mode"
$libexec_dir/install-directory $src $dest
find $src -maxdepth 1 -type f -execdir install $install_args {} $dest/{} \;
if [ -d "$src/files" ];
then
$libexec_dir/install-directory $src/files $dest/files
find $src/files -maxdepth 1 -type f -execdir install $install_args {} $dest/files \;
fi
echo Install $(realpath $dest)