1
0

install 641 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. # This file is part of the OpenADK project. OpenADK is copyrighted
  3. # material, please see the LICENCE file in the top-level directory.
  4. # eliminate unwanted install flags:
  5. # -o and -g require root as caller which we don't want
  6. # -s is unwanted as we strip ourselfs if debugging is turned off
  7. declare -a opts
  8. while [[ "$1" ]]; do
  9. case "$1" in
  10. -o|--owner) shift ;;
  11. -g|--group) shift ;;
  12. -s|--strip) ;;
  13. *) opts+=("$1") ;;
  14. esac
  15. shift
  16. done
  17. # prefer ginstall if available
  18. if [ -z "$(which ginstall 2>/dev/null)" ];then
  19. install=/usr/bin/install
  20. else
  21. install=ginstall
  22. fi
  23. # do the actual call
  24. exec $install "${opts[@]}"