1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00
pdf2htmlEX/share/build_css.sh

26 lines
634 B
Bash
Raw Normal View History

2013-10-30 07:50:07 +00:00
#!/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"