diff --git a/scripts/geodata/quattroshapes/download_quattroshapes.sh b/scripts/geodata/quattroshapes/download_quattroshapes.sh index 4324355a..7e3fbde9 100755 --- a/scripts/geodata/quattroshapes/download_quattroshapes.sh +++ b/scripts/geodata/quattroshapes/download_quattroshapes.sh @@ -2,6 +2,24 @@ BASE_URL="http://static.quattroshapes.com" FILENAMES=("qs_adm0.zip" "qs_adm1.zip" "qs_adm2.zip" "qs_localadmin.zip" "qs_localities.zip", "qs_neighborhoods.zip") +DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) + +PREV_DIR=`pwd` + +if [ "$#" -eq 1 ]; then + OUT_DIR=$1 +else + OUT_DIR = $DIR/../../../data/quattroshapes +fi + + +mkdir -p $OUT_DIR + +cd $OUT_DIR + for filename in ${FILENAMES[*]}; -do wget $BASE_URL/$filename -done; \ No newline at end of file +do wget $BASE_URL/$filename; +unzip $filename; +done; + +cd $PREV_DIR \ No newline at end of file