portzap/bin/portzap-install-port
0x1eef f08ad32c90 Add portzap-install-port
Add a new script that is responsible for installing a new port
to /usr/ports with the correct permissions.
2023-01-19 10:13:20 -03:00

15 lines
366 B
Bash
Executable file

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