diff --git a/setup/debinstall.sh b/setup/debinstall.sh new file mode 100755 index 00000000000..0686ec13f79 --- /dev/null +++ b/setup/debinstall.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Install Debian packages needed to run Odoo. + +if [ "$(id -u)" -ne "0" ]; then + echo "This script must be run as root" >&2 + exit 1 +fi + +script_path=$(realpath "$0") +script_dir=$(dirname "$script_path") +control_path=$(realpath "$script_dir/../debian/control") + +apt-get update +sed -n '/^Depends:/,/^[A-Z]/p' "$control_path" \ +| awk '/^ [a-z]/ { gsub(/,/,"") ; print $1 }' | sort -u \ +| DEBIAN_FRONTEND=noninteractive xargs apt-get install -y -qq