/dist/dist.sh
http://jplex.googlecode.com/ · Shell · 63 lines · 61 code · 1 blank · 1 comment · 0 complexity · 59796044ccfcce063915b86701c04579 MD5 · raw file
- #!/bin/sh
- VERSION=`cat ../src/jPlex.js | grep version: | awk '{ print $2 }' | sed -e "s/[',]//g"`
- REV=`svn info | grep sion | head -n 1 | (awk '{ print $NF; }')`
- VERSION=$VERSION.$REV
- SEPARATOR=":"
- FINALFILE=jplex-$VERSION
- if [ $1 = "win" ]; then
- SEPARATOR="\;"
- fi
-
- echo "Dist files:"
- echo "\tPrototype:\t1.6.1 RC2"
- echo "\tScriptaculous:\t1.8.1"
- echo "\tjPlex:\t\t$VERSION"
- echo "Output folder: \n\t$FINALFILE/"
- cd tools/dist/src/
- javac Main.java -classpath .$SEPARATOR../../yuicompressor-2.4.jar
- cd ../../../
- mkdir $FINALFILE
- if [ ! $? = 0 ]; then
- echo "This release has already been dist"
- exit 2;
- fi
- mkdir $FINALFILE/assets
- java -classpath tools/yuicompressor-2.4.jar$SEPARATOR./tools/dist/src/ Main ../ $FINALFILE
- if [ ! $? = 0 ]; then
- rm -rf $FINALFILE
- fi
- #Then copy the demo files
- cd ../demo/stable/
- mkdir static
- php ../../dist/dist_demos.php
- cp -R assets libs static/;
- for i in `find static | grep '\.svn$'`; do
- rm -rf $i;
- done;
- cd -
- cp -r ../demo $FINALFILE/
- for i in `find $FINALFILE/demo | grep '\.svn$'`; do
- rm -rf $i;
- done;
- for i in `find $FINALFILE/demo | grep '\.html$'`; do
- cat $i | sed -e 's/src\/jPlex\.js/jplex\.js/g' | sed -e 's/src\/.*ie7\.css/assets\/jplex-ie7\.css/g' | sed -e 's/src\/.*ie6\.css/assets\/jplex-ie6\.css/g' | sed -e 's/src\/.*\.css/assets\/jplex\.css/g' > $i.tmp
- mv $i.tmp $i
- done;
- mv $FINALFILE/demo/stable/static $FINALFILE/demo/
- rm -rf $FINALFILE/demo/stable $FINALFILE/demo/static/libs/assets $FINALFILE/demo/static/libs/jplex.js
- rm -rf ../demo/stable/static