Create new dist script and scp copy.

This commit is contained in:
Paulo Gustavo Veiga
2011-07-04 13:57:02 -03:00
parent c328a65d97
commit 97b3bdf044
3 changed files with 53 additions and 1 deletions

32
installer/package-src.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
set -e
set -u
WISE_VERSION=$1
TMP_DIR=/tmp/wise-src/wisemapping-src
TAR_FILE_NAME=wisemapping-${WISE_VERSION}-src.tar.gz
OUTPUT_DIR=`pwd`"/target"
OUTPUT_FILE=${OUTPUT_DIR}/${TAR_FILE_NAME}
# Clean all.
cd ..
rm -rf ${TMP_DIR}/../
mvn clean
# Prepare copy
mkdir -p ${TMP_DIR}
rsync -aCv --exclude ".git" --exclude "wisemapping.i*" --exclude "*/*.iml" --exclude "*/wisemapping.log*" --exclude "**/.DS_Store" --exclude "*.textile" --exclude "**/.gitignore" --exclude "installer" --exclude "*/target" . ${TMP_DIR}
# Zip file
[ ! -e ${OUTPUT_DIR} ] && mkdir ${OUTPUT_DIR}
rm -f ${OUTPUT_FILE}
cd ${TMP_DIR}/..
tar -cvzf ${OUTPUT_FILE} .
echo
echo "#################################################################"
echo "Zip file generated on:"${OUTPUT_FILE}
echo "#################################################################"