Moved compression script to xCAT-UI.spec
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8944 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
e543f7462b
commit
c6f5ccac96
22
makeuirpm
22
makeuirpm
@ -28,28 +28,6 @@ else
|
||||
else
|
||||
pkg="packages"
|
||||
fi
|
||||
|
||||
# Minify Javascript files using Google Compiler
|
||||
JAVA='/opt/ibm/java-ppc64-60/jre/bin/java'
|
||||
JAR='/xcat2/build/tools/compiler.jar'
|
||||
UI='xCAT-UI/js'
|
||||
|
||||
declare -a FILES
|
||||
IFS='
|
||||
'
|
||||
|
||||
# Find all Javascript files
|
||||
FILES=(`find ${UI} -name '*.js'`)
|
||||
for i in ${FILES[*]}; do
|
||||
# Ignore Javascripts that are already minified
|
||||
if [[ ! $i =~ '.*\.min\.js$' ]]; then
|
||||
`${JAVA} -jar ${JAR} --warning_level=QUIET --js=$i --js_output_file=$i.min`
|
||||
|
||||
# Remove old Javascript and replace it with minified version
|
||||
rm -rf $i
|
||||
mv $i.min $i
|
||||
fi
|
||||
done
|
||||
|
||||
set -x
|
||||
tar --exclude=.svn -czf /usr/src/$pkg/SOURCES/xCAT-UI-$VER.tar.gz xCAT-UI
|
||||
|
Loading…
Reference in New Issue
Block a user