CURRENT_DIR=`pwd` exportDir="exportPack" exportPath="$PROJECT_PATH/$exportDir" if [ -d "$exportPath" ] ; then rm -Rf "$exportPath" fi mkdir -p $exportPath cd $WWW_PATH find js -name '*.pack.js' -type f -exec cp -r --parents '{}' $exportPath \; find css -name '*.pack.css' -type f -exec cp -r --parents '{}' $exportPath \; if [ "$(ls -A $exportPath)" ] ; then REVISION=`svn info . | grep Revision | sed 's/[^0-9]\+//'` archiveName="$REVISION-pack.tar.bz2" cd $exportPath tar -cjf $archiveName * mv $archiveName .. cd .. rm -Rf "$exportPath" echo 'Done' echo $PROJECT_PATH/$archiveName cd $CURRENT_DIR else echo 'ERROR: packed files is not found' fi exit 0