bin/install-file: pass multiple files to 'install' cmd

This commit is contained in:
0x1eef 2023-01-21 02:42:33 -03:00
parent d8b0614da0
commit 4a22c51a03
3 changed files with 16 additions and 12 deletions

View file

@ -104,7 +104,7 @@ install() {
exit 1
fi
cd $portzap_dir
find . -maxdepth 1 -type d -exec $libexec_dir/install-directory {} $ports_dir $libexec_dir \;
find . -maxdepth 1 -type d -exec $libexec_dir/install-directory $ports_dir $libexec_dir {} +
}
case $1 in

View file

@ -1,11 +1,12 @@
#!/bin/sh
src=$1
dest=$2
libexec_dir=$3
dest=$1
libexec_dir=$2
group=_portzap
mode=u=rwx,g=rx,o=
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 \;
for i in $(seq 3 $#); do
dir=$(eval echo -n \${$i})
install -d -g $group -m $mode $src $dest/$dir
echo Install $(realpath $dest/$dir)
find $dir -maxdepth 1 -type f -exec $libexec_dir/install-file $dest/$dir {} +
find $dir -depth 1 -type d -exec $libexec_dir/install-directory $dest $libexec_dir {} \;
done

View file

@ -1,6 +1,9 @@
#!/bin/sh
src=$1
dest=$2
dest=$1
group=_portzap
mode=u=rw,g=rw,o=
install -g $group -m $mode $src $dest
files=""
for i in $(seq 2 $#); do
files="${files} $(eval echo -n \${$i})"
done
install -g $group -m $mode $files $dest