aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorSam Pearson <sam@sgp.me.uk>2020-02-12 16:39:18 +0000
committerSam Pearson <sam@sgp.me.uk>2020-03-03 09:20:46 +0000
commit2baa60e1d41c88a69246732fbbef36167d367ea5 (patch)
tree9b1874e833c830017ecd3fd95293efebf9b536a1 /script
parentd65ce0e6b24c8302db4107290d12d8e7d5c864b9 (diff)
[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`.
Diffstat (limited to 'script')
-rwxr-xr-xscript/bootstrap10
1 files changed, 10 insertions, 0 deletions
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