summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-01-01 22:35:59 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-01 22:35:59 +0100
commited48cdc206c535c7b234ccd6e3ca968d5d243991 (patch)
tree89f8627b83e73a76e1b738bc728cf78eb1a03a1a
parent88d545eff1d6215c1f3dd1ef1386edb6352a996b (diff)
Refactored build-themes.sh
-rwxr-xr-xthemes/build-themes.sh20
1 files changed, 14 insertions, 6 deletions
diff --git a/themes/build-themes.sh b/themes/build-themes.sh
index 404b6890..08b23419 100755
--- a/themes/build-themes.sh
+++ b/themes/build-themes.sh
@@ -1,7 +1,15 @@
-#!/bin/sh
+#!/bin/bash
-lessc theme0.less > ../public/css/theme0.css
-lessc theme1.less > ../public/css/theme1.css
-lessc theme2.less > ../public/css/theme2.css
-lessc theme3.less > ../public/css/theme3.css
-lessc theme4.less > ../public/css/theme4.css
+FILE_PATH="`dirname \"$0\"`"
+
+for file in `ls "${FILE_PATH}/"*.less`; do
+ filename="${file##*/}"
+ themeName="${filename%.less}"
+
+ if [[ "$filename" == "base.less" ]]; then
+ continue;
+ fi
+
+ echo "Building ${themeName}"
+ lessc "${file}" > "${FILE_PATH}/../public/css/${themeName}.css"
+done