diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rwxr-xr-x | bin/install_packages | 13 | ||||
-rwxr-xr-x | script/bootstrap | 10 |
3 files changed, 24 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d7a5714b..437f48656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,6 +84,7 @@ - Add configuration for setting Content-Security-Policy header. - Add banner on staging website/emails, and STAGING_FLAGS option to hide it. - Do not hard code site name in database fixture. + - Ensure OS dependencies are kept updated in development environments. - Open311 improvements: - Support use of 'private' service definition <keywords> to mark reports made in that category private. #2488 diff --git a/bin/install_packages b/bin/install_packages new file mode 100755 index 000000000..7b4bfd8e1 --- /dev/null +++ b/bin/install_packages @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +PACKAGE_FILE=conf/packages + +[ -n "$1" ] && PACKAGE_FILE="conf/packages.${1}" + +apt-get update + +grep -v ^# $PACKAGE_FILE | grep -v ^$ | xargs apt-get install -qq -y + diff --git a/script/bootstrap b/script/bootstrap index dfebd7449..5345b163e 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -4,4 +4,14 @@ set -e cd "$(dirname "$0")/.." git submodule --quiet update --init --recursive --rebase + +# Let's see if we can't work out where we might be running. +if cut -d/ -f2 /proc/self/cgroup | sort -u | grep -q docker ; then + # Docker + sudo bin/install_packages docker +else + # Fallback + sudo bin/install_packages generic +fi + bin/install_perl_modules |