Script to compile the less files of bootstrapbase
authorFrederic Massart <fred@moodle.com>
Wed, 24 Jul 2013 05:55:56 +0000 (13:55 +0800)
committerFrederic Massart <fred@moodle.com>
Wed, 24 Jul 2013 05:55:56 +0000 (13:55 +0800)
scripts/less.sh [new file with mode: 0644]

diff --git a/scripts/less.sh b/scripts/less.sh
new file mode 100644 (file)
index 0000000..b61dcb7
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# Compile the Less files of Bootstrap base.
+#
+
+P=`mdk info -v path`
+if [[ -z "$(which recess)" ]]; then
+    echo "Recess could not be found. Aborting..."
+    exit 1
+fi
+
+DIR="$P/theme/bootstrapbase/less"
+if [[ ! -d "$DIR" ]]; then
+    echo "Could not find theme/boostrapbase. Aborting..."
+    exit 2
+fi
+
+echo "Compiling theme/bootstrapbase CSS"
+cd "$DIR"
+recess --compile --compress moodle.less > ../style/moodle.css
+recess --compile --compress editor.less > ../style/editor.css