summaryrefslogtreecommitdiff
path: root/builddeps.sh
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-07-13 06:17:58 +0000
committerRuben Undheim <ruben.undheim@gmail.com>2018-07-13 06:17:58 +0000
commit9e0bd16a997e55d6b9c2e80734ea8e61794c7602 (patch)
treed73377e0368b0c730d5a14019b1eee53897505bf /builddeps.sh
parente1fffcb07ce0d8b0db9e0b4b5e1e0c1128197af5 (diff)
New upstream version 0.84.22
Diffstat (limited to 'builddeps.sh')
-rwxr-xr-xbuilddeps.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/builddeps.sh b/builddeps.sh
new file mode 100755
index 0000000..38aa197
--- /dev/null
+++ b/builddeps.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+distribution=$(cat /etc/os-release |grep "^NAME=" |cut -d '=' -f 2)
+
+echo "Distribution detected is \"${distribution}\""
+
+MODE="$1"
+
+if [ ${MODE:="interactive"} != "ci" ]; then
+ MODE="interactive"
+fi
+
+echo "Running $0 in $MODE mode"
+
+
+if [ "${distribution}" = "\"Ubuntu\"" ]; then # idiots...
+ PKGS="$(cat .concourse/ubuntu/pkg.lst)"
+ if [ ${MODE} = "ci" ]; then
+ apt-get update -y
+ apt-get install -y $PKGS
+ else
+ apt-get install $PKGS
+ fi
+elif [ "${distribution}" = "Fedora" ]; then
+ PKGS="$(cat .concourse/fedora/pkg.lst)"
+ if [ ${MODE} = "ci" ]; then
+ dnf update -y
+ dnf install -y $PKGS
+ else
+ dnf install $PKGS
+ fi
+else
+ echo "No idea what to do.. trying to run regular builddeps"
+fi