75de09ca8d42efd06d0b33f889b21533a051bc18
[mdk.git] / mdk / scripts / less.sh
1 #!/bin/bash
2 #
3 # Compile the Less files of Bootstrap base.
4 #
5 # Deprecated script, please refer to the CSS command.
6
7 echo "This script is deprecated, please use:"
8 echo " mdk css --compile"
9 echo ""
10
11 P=`mdk info -v path`
12 if [[ -z "$(which recess)" ]]; then
13 echo "Recess could not be found. Aborting..."
14 exit 1
15 fi
16
17 DIR="$P/theme/bootstrapbase/less"
18 if [[ ! -d "$DIR" ]]; then
19 echo "Could not find theme/boostrapbase. Aborting..."
20 exit 2
21 fi
22
23 echo "Compiling theme/bootstrapbase CSS"
24 cd "$DIR"
25 recess --compile --compress moodle.less > ../style/moodle.css
26 recess --compile --compress editor.less > ../style/editor.css