From 2baa60e1d41c88a69246732fbbef36167d367ea5 Mon Sep 17 00:00:00 2001 From: Sam Pearson Date: Wed, 12 Feb 2020 16:39:18 +0000 Subject: [script/bootstrap] Keep OS packages updated in development environments This adds a script, `bin/install_packages`, that will install packages listed in versions of `conf/packages*` and calls it from the bootstrap script in a way appropriate to the environment it is being run under. This should ensure that, for example, changes to dependencies will be applied to Vagrant machines in-between tagged releases. The default packages file used will be `packages.generic`. --- script/bootstrap | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'script/bootstrap') 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 -- cgit v1.2.3