aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2018-02-23 22:17:26 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2018-02-23 22:17:26 -0800
commit733906ecdaaf034bf01f3d5f08c43dc18260fe38 (patch)
tree9365f704b2bfea0b6d9ab441bfe2c33877032f74 /docker/run.sh
parentgitignore: root ignores to checkout root (diff)
downloadtyrian-theme-733906ecdaaf034bf01f3d5f08c43dc18260fe38.tar.gz
tyrian-theme-733906ecdaaf034bf01f3d5f08c43dc18260fe38.tar.bz2
tyrian-theme-733906ecdaaf034bf01f3d5f08c43dc18260fe38.zip
Docker: add way to build without polluting local system.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'docker/run.sh')
-rwxr-xr-xdocker/run.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/docker/run.sh b/docker/run.sh
new file mode 100755
index 0000000..b9c9a3f
--- /dev/null
+++ b/docker/run.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# POSIX sh, not bash!
+die() {
+ set +x
+ echo "$*" 1>&2
+ exit 1
+}
+# export for debugging
+[ "$DEBUG" == "1" ] && set -x
+# go to volume
+cd /repo
+basedir=$PWD
+# create output directory:
+mkdir -p assets
+# install grunt
+npm install -g grunt-cli || die "FAIL:${PWD}: npm install -g grunt-cli"
+# setup
+for d in sources/css/bootstrap sources/css/tyrian . ; do
+ cd $basedir/$d && npm install || die "FAIL:${PWD}: npm install failed"
+done
+# do the build
+cd $basedir && grunt || die "FAIL:${PWD}: grunt"