/usr/bin/acr-install is in acr 1.2-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | #!/bin/sh
#
# if -d is set force +x ? or just warn when no X ?
#
# usage:
# $ acr-install [options] source1 source2 ... destdir/file
# $ acr-install -d dir1 dir2 dir3
# $ acr-install -P PLIST -D /usr/local -x dir/* bin/
#
# acr-install -program : -c -s -o root -g root -m 555
# acr-install -library : -c -o root -g root -m 555
# acr-install -data : -o root -g root -m 755
#
# -c : ignored
# -d DIR : create directories
# -g GROUP : change the group
# -m MODE :
# -o OWNER :
# -R : recursive
# -b : backup existing files before overwriting
# -D DESTDIR : destdir
# -p : preserve timestamps
# -s : strip symbol tables
# -S SUFFIX : override the default backup suffix
# -P PLIST : append files copied to this file
# -x : only copy executables
# TODO: multiple sources
flags=""
noflags=""
plist_file=""
CMD=""
show_help() {
cat <<EOF
acr-install wrapper for standard install program.
-program : sets permissions and flags to install a program.
-script : sets permissions and flags to install an script.
-library : sets permissions and flags to install an library.
-data : sets permissions and flags to install data stuff (share).
[ press intro ]
EOF
read nil
}
for A in $@ ; do
case "$CMD" in
"PLIST")
plist_file="$A"
CMD=""
continue
;;
esac
case "$A" in
"-program")
flags="$flags -c -s -o root -g root -m 555"
continue;
;;
"-script")
flags="$flags -c -o root -g root -m 555"
continue;
;;
"-library")
flags="$flags -c -o root -g root -m 555"
continue
;;
"-data")
flags="$flags -o root -g root -m 755"
continue
;;
"-h"|"--help")
show_help
;;
"-P")
CMD="PLIST"
continue;
break;
;;
esac
flags="$flags $A"
file2=$file
file=$A
done
install $flags
if [ "$PLIST" ]; then
echo $file >> $plist_file
fi
|