Statistics
| Revision:

root / org.gvsig.educa.thematicmap.app / trunk / org.gvsig.educa.thematicmap.app / testing / prepare-to-upload.sh @ 165

History | View | Annotate | Download (1.06 KB)

1
#!/bin/bash
2

    
3
##############################################
4
# Script to generate the contents to upload 
5
#       to gvSIG for add-on functionally test
6
#############################################
7

    
8
SCRIPT_PATH=`readlink -f $0`
9
SRC_DIR=`dirname "$SCRIPT_PATH"`
10
TARGET_DIR="$SRC_DIR/target"
11
if [ -e "$TARGET_DIR" ] ; then
12
  echo "Cleaning work folder..."
13
  rm -r $TARGET_DIR
14
fi
15

    
16
echo "Creating work folder ($TARGET_DIR)..."
17
mkdir "$TARGET_DIR"
18
echo "Copying source files..."
19
cp "$SRC_DIR/org.gvsig.educa.thematicmap.mm" $TARGET_DIR
20
tar c --exclude-vcs geodata | tar x -C $TARGET_DIR
21
tar c --exclude-vcs resources | tar x -C $TARGET_DIR
22
cp "$SRC_DIR/org.gvsig.educa.thematicmap.html" $TARGET_DIR
23
cp -R "$SRC_DIR/org.gvsig.educa.thematicmap.html_files" $TARGET_DIR
24
cd $TARGET_DIR
25
echo "Ziping geodata..."
26
zip -r org.gvsig.educa.thematicmap-data.zip geodata
27
rm -r "$TARGET_DIR/geodata"
28
echo "Ziping resource..."
29
zip -r org.gvsig.educa.thematicmap-resources.zip resources
30
rm -r "$TARGET_DIR/resources"
31
echo "Done!"
32
echo "Folder $TARGET_DIR contains the files to upload for testing."
33
echo ""