gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 satır
762B

  1. #!/bin/sh
  2. #
  3. # Install Debian packages needed to run Odoo.
  4. if [ "$1" = "-l" -o "$1" = "--list" ]; then
  5. cmd="echo"
  6. else
  7. cmd="apt-get install -y --no-install-recommends"
  8. if [ "$(id -u)" -ne "0" ]; then
  9. echo "\033[0;31mThis script must be run as root to install dependencies, starting a dry run.\033[0m" >&2
  10. cmd="$cmd -s"
  11. else
  12. apt-get update
  13. fi
  14. if [ "$1" = "-q" -o "$1" = "--quiet" ]; then
  15. cmd="$cmd -qq"
  16. fi
  17. fi
  18. script_path=$(realpath "$0")
  19. script_dir=$(dirname "$script_path")
  20. control_path=$(realpath "$script_dir/../debian/control")
  21. sed -n '/^Depends:/,/^[A-Z]/p' "$control_path" \
  22. | awk '/^ [a-z]/ { gsub(/,/,"") ; gsub(" ", "") ; print $NF }' | sort -u \
  23. | DEBIAN_FRONTEND=noninteractive xargs $cmd
上海开阖软件有限公司 沪ICP备12045867号-1