2014-03-08 13:37:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
2017-12-13 15:47:52 +00:00
|
|
|
outFile=templates/lib/100_lam.${SOURCE_DATE_EPOCH}.min.js
|
2017-12-13 16:05:17 +00:00
|
|
|
if [ ! -e $outFile ]; then
|
|
|
|
files=`ls templates/lib/*.js`
|
|
|
|
jsFiles=""
|
|
|
|
for file in $files; do
|
2018-12-10 16:53:38 +00:00
|
|
|
jsFiles="$jsFiles $file"
|
2017-12-13 16:05:17 +00:00
|
|
|
done
|
2018-12-10 16:53:38 +00:00
|
|
|
uglifyjs -o $outFile $jsFiles
|
2017-12-13 16:05:17 +00:00
|
|
|
rm $files
|
|
|
|
# add final new line to supress Debian warnings
|
|
|
|
echo "" >> $outFile
|
|
|
|
fi
|
2014-03-08 13:37:43 +00:00
|
|
|
|
2017-04-02 13:35:06 +00:00
|
|
|
files=`ls style/*.css`
|
2017-12-13 15:47:52 +00:00
|
|
|
outFile=style/100_lam.${SOURCE_DATE_EPOCH}.min.css
|
2017-12-13 16:05:17 +00:00
|
|
|
if [ ! -e $outFile ]; then
|
|
|
|
cat $files | cleancss -o ${outFile}
|
|
|
|
rm $files
|
|
|
|
# add final new line to supress Debian warnings
|
|
|
|
echo "" >> $outFile
|
|
|
|
fi
|