diff --git a/src/main/webapp/static/themes/compiletheme.sh b/src/main/webapp/static/themes/compiletheme.sh
index 0e6ee8f1513516d3d814212a31a8fc32054920ea..7dea436a886d571a8271c3fcfb12b0525063e059 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