diff options
author | Phil Sutter <phil.sutter@viprinet.com> | 2015-02-24 12:47:14 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-02-28 10:14:36 +0100 |
commit | 50c169238b50027032882601d7fde912caa2a2ea (patch) | |
tree | f0a01dfe00f7af479cd3b88f7b98f5b26ade74ef /scripts | |
parent | 1f9113fee2da6c57c561616428439e2cdebf10e4 (diff) |
scripts/install: fix and improve
Keep the option filtering as it actually prevents lots of package
patching.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/scripts/install b/scripts/install index 0fe925d0f..174d27d5a 100755 --- a/scripts/install +++ b/scripts/install @@ -2,9 +2,26 @@ # This file is part of the OpenADK project. OpenADK is copyrighted # material, please see the LICENCE file in the top-level directory. +# eliminate unwanted install flags: +# -o and -g require root as caller which we don't want +# -s is unwanted as we strip ourselfs if debugging is turned off +declare -a opts +while [[ "$1" ]]; do + case "$1" in + -o|--owner) shift ;; + -g|--group) shift ;; + -s|--strip) ;; + *) opts+=("$1") ;; + esac + shift +done + +# prefer ginstall if available if [ -z "$(which ginstall 2>/dev/null)" ];then - /usr/bin/install "$@" + install=/usr/bin/install else - ginstall "$@" + install=ginstall fi +# do the actual call +exec $install "${opts[@]}" |