From 8db4f7affd6ebb97b9c4a226c8cdeb83cf765528 Mon Sep 17 00:00:00 2001 From: gnaegi <none@none> Date: Fri, 18 May 2012 21:01:53 +0200 Subject: [PATCH] OO-253 optimize sass compile script for default theme and custom theme compilation --- src/main/webapp/static/themes/compiletheme.sh | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/static/themes/compiletheme.sh b/src/main/webapp/static/themes/compiletheme.sh index 0e6ee8f1513..7dea436a886 100755 --- a/src/main/webapp/static/themes/compiletheme.sh +++ b/src/main/webapp/static/themes/compiletheme.sh @@ -1,15 +1,27 @@ #!/bin/sh # -# compilescript for openolat-SASS-theme -# can be included into eclipse-project-build (project-properties --> "Builders") +# Compilescript for openolat-SASS-theme +# Can be included into eclipse-project-build (project-properties --> "Builders") +# +# It compiles the whole directory and mostly all changed files. +# In the case it does not compile all files, it's helpful to delete the sass-cache (rm -r .sass-cache). # +# usage: +# ./compiletheme.sh # compile themes in the current directory +# ./compiletheme.sh /path/to/your/custom/theme # compile themes in the given directory +# +#### style=compressed #style=compact -echo "compiling SASS: $1 $style" +# default to compile the themes in the current directory +directory="." +if [ ! -z $1 ]; then directory=$1; fi + +echo "Compiling SASS: $directory $style" sass --version -sass --style $style --update $1/layout.scss:$1/layout.css --load-path openolat openolat/all openolat/all/modules openolat/print openolat/mobile +sass --style $style --update $directory:$directory --load-path openolat openolat/all openolat/all/modules openolat/print openolat/mobile echo "done" \ No newline at end of file -- GitLab