uv: update to 0.4.30.
[void-pkg.git] / common / wrappers / install.sh
blob82b61c27df6fbad0eac1b698a8d83d1d58af8056
1 #!/bin/bash
2 # install-wrapper - run install(1), but never strip or chown
3 set -e
5 # taken from install (GNU coreutils) 8.23
6 opts='bcCdDg:m:o:psS:t:TvZ'
7 longopts='backup::,compare,directory,group:,mode:,owner:,preserve-timestamps,\
8 strip:,strip-program:,suffix:,target-directory:,no-target-directory,verbose,\
9 preserve-context,context::,help,version'
11 parsed="$(getopt -o "$opts" --long "$longopts" -n 'install-wrapper' -- "$@")"
12 eval set -- "$parsed"
14 iopts=()
15 while :; do
16 case "$1" in
17 -s|--strip)
18 echo "install-wrapper: overriding call to strip(1)." 1>&2
19 iopts+=("$1" --strip-program=true)
20 shift;;
21 --strip-program)
22 echo "install-wrapper: dropping strip program '$2'." 1>&2
23 shift 2;;
24 -g|--group|-o|--owner)
25 echo "install-wrapper: dropping option $1 $2." 1>&2
26 shift 2;;
27 -b|-c|-C|--compare|-d|--directory|-D|-p|--preserve-timestamps|\
28 -T|--no-target-directory|-v|--verbose|--preserve-context|-Z|\
29 --help|--version)
30 iopts+=("$1")
31 shift;;
32 -m|--mode|-S|--suffix|-t|--target-directory|--backup|--context)
33 iopts+=("$1" "$2")
34 shift 2;;
35 --)
36 shift
37 break;;
39 echo 'cant happen, report a bug' 1>&2
40 exit 111;;
41 esac
42 done
44 exec /usr/bin/install "${iopts[@]}" -- "$@"