product zip files now have a proper root folder
[taxeditor.git] / eu.etaxonomy.taxeditor / deploy_nightly.sh
1 #!/bin/bash
2
3 # local testing
4 #WORKSPACE="/Users/n.hoffmann/Documents/workspace/taxeditor/trunk"
5
6 PRODUCT_DIR="$WORKSPACE/eu.etaxonomy.taxeditor/target/products"
7
8 DEPLOYMENT_SERVER="wp5.e-taxonomy.eu"
9 DEPLOYMENT_DIR="/var/www/download/taxeditor/nightly"
10
11 # bash check if directory exists
12 if [ ! -d $PRODUCT_DIR ]; then
13 echo "Product directory does not exist: $PRODUCT_DIR"
14 exit 1
15 fi
16
17 PRODUCTS=$(ls $PRODUCT_DIR/eu.etaxonomy.taxeditor.product-*.zip)
18
19 if [ ! $PRODUCTS ]; then
20 echo "No products in product directory: $PRODUCT_DIR"
21 exit 1
22 fi
23
24 for FILE in $PRODUCTS; do
25 scp $FILE root@$DEPLOYMENT_SERVER:$DEPLOYMENT_DIR
26 done
27
28