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 exit 1
fi fi
cd $portzap_dir 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 case $1 in

View file

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