1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00
pdf2htmlEX/share/build_css.sh
2014-07-13 16:59:30 -07:00

26 lines
638 B
Bash
Executable File

#!/bin/sh -ex
# 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"