commit 78a48ab8aeb4228ac211839b994020cef6830419
parent a5396a9b413649c049283e949c633d7db8877ee3
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 1 Oct 2020 11:11:16 +0200
build: Fix usage of install
Prefix is a mandatory argument and not a switch. This
commit also includes a simplification of the use of
prefix in the shell script.
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/install b/scripts/install
@@ -11,22 +11,22 @@ do
;;
-*)
echo 1=$1
- echo usage: install -t prefix [-p proto] >&2
+ echo usage: install [-p proto] prefix >&2
exit 1
;;
esac
done
-prefix=$1
+prefix=${1?'prefix missed'}
while read type perm name
do
case $type in
d)
- mkdir -p ${prefix?}/$name
+ mkdir -p $prefix/$name
;;
f)
- cp $name ${prefix?}/$name
+ cp $name $prefix/$name
;;
*)
echo install: wrong entry type >&2