Add clarity to variable names in "install-directory"
This commit is contained in:
parent
98621f5fc5
commit
a4e5b2f9be
1 changed files with 11 additions and 8 deletions
|
@ -1,22 +1,25 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
dest=$1
|
ports_dir=$1
|
||||||
libexec_dir=$2
|
libexec_dir=$2
|
||||||
group=_portzap
|
group=_portzap
|
||||||
mode=u=rwx,g=rx,o=
|
mode=u=rwx,g=rx,o=
|
||||||
for i in $(seq 3 $#); do
|
for i in $(seq 3 $#); do
|
||||||
dir=$(eval echo -n \${$i})
|
relative_portzap_dir=$(eval echo -n \${$i})
|
||||||
install -d -g $group -m $mode $src $dest/$dir
|
# Install directory
|
||||||
echo Install $(realpath $dest/$dir)
|
install -d -g $group -m $mode \
|
||||||
|
$relative_portzap_dir \
|
||||||
|
$ports_dir/$relative_portzap_dir
|
||||||
|
echo $(realpath $ports_dir/$relative_portzap_dir)
|
||||||
|
|
||||||
# Install files
|
# Install files
|
||||||
find $dir -maxdepth 1 -type f \
|
find $relative_portzap_dir -maxdepth 1 -type f \
|
||||||
\( -not -name ".gitignore" \) \
|
\( -not -name ".gitignore" \) \
|
||||||
\( -not -name ".arcconfig" \) \
|
\( -not -name ".arcconfig" \) \
|
||||||
-exec $libexec_dir/install-file $dest/$dir {} +
|
-exec $libexec_dir/install-file $ports_dir/$relative_portzap_dir {} +
|
||||||
|
|
||||||
# Install subdirs (recursive)
|
# Install subdirs (recursive)
|
||||||
find -s $dir -depth 1 -type d \
|
find -s $relative_portzap_dir -depth 1 -type d \
|
||||||
\( -not -name ".git" \) \
|
\( -not -name ".git" \) \
|
||||||
\( -not -name ".hooks" \) \
|
\( -not -name ".hooks" \) \
|
||||||
-exec $libexec_dir/install-directory $dest $libexec_dir {} \;
|
-exec $libexec_dir/install-directory $ports_dir $libexec_dir {} \;
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue