1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-02 16:25:41 +00:00
pdf2htmlEX/share/build_css.sh
2013-10-30 15:50:07 +08:00

26 lines
634 B
Bash
Executable File

#!/bin/sh
# Compile and optimize CSS code
# Copyright 2013 Lu Wang <coolwanglu@gmail.com>
BASEDIR=$(dirname $0)
YUI_DIR="$BASEDIR/../3rdparty/yuicompressor"
YUI_JAR="$YUI_DIR/yuicompressor-2.4.8.jar"
build () {
INPUT="$BASEDIR/$1"
OUTPUT="$BASEDIR/$2"
(echo "Building $OUTPUT with YUI Compressor" && \
java -jar "$YUI_JAR" \
--charset utf-8 \
-o "$OUTPUT" \
"$INPUT" && \
echo 'Done.') || \
(echo 'Failed. ' && \
echo 'Using the uncompressed version.' && \
cat "$INPUT" > "$OUTPUT")
}
build "base.css" "base.min.css"
build "fancy.css" "fancy.min.css"