source: subversion/applications/rendering/mapnik/get-coastlines.sh @ 23334

Last change on this file since 23334 was 22615, checked in by rodo, 9 years ago

add test on executable

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/sh
2
3UNZIP=/usr/bin/unzip
4TAR=/bin/tar
5BUNZIP2=/bin/bunzip2
6
7if [ ! -x $UNZIP ]; then
8    echo "unzip is not installed in $UNZIP, it is needed by this script"
9    exit
10fi
11
12if [ ! -x $TAR ]; then
13    echo "tar is not installed in $TAR, it is needed by this script"
14    exit
15fi
16
17if [ ! -x $BUNZIP2 ]; then
18    echo "bunzip2 is not installed in $BUNZIP2, it is needed by this script"
19    exit
20fi
21
22
23wget http://tile.openstreetmap.org/world_boundaries-spherical.tgz -O world_boundaries-spherical.tgz
24wget http://tile.openstreetmap.org/processed_p.tar.bz2 -O processed_p.tar.bz2
25wget http://tile.openstreetmap.org/shoreline_300.tar.bz2 -O shoreline_300.tar.bz2
26wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/10m-populated-places.zip -O 10m-populated-places.zip
27wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/110m-admin-0-boundary-lines.zip -O 110m-admin-0-boundary-lines.zip
28
29tar xvf world_boundaries-spherical.tgz
30
31if [ -d world_boundaries ]; then
32
33        if [ -f processed_p.tar.bz2 ]; then
34                tar xvf processed_p.tar.bz2
35                mv processed_p.[dis]* world_boundaries/
36        else
37                echo 'processed_p.tar.bz2 not present'
38        fi
39
40        if [ -f shoreline_300.tar.bz2 ]; then
41                tar xvf shoreline_300.tar.bz2
42                mv shoreline_300.[dis]* world_boundaries/
43        else
44                echo 'shoreline_300.tar.bz2 not present'
45        fi
46
47        if [ -f 10m-populated-places.zip ]; then
48                unzip 10m-populated-places.zip -d world_boundaries
49        else
50                echo '10m-populated-places.zip not present'
51        fi
52
53        if [ -f 110m-admin-0-boundary-lines.zip ]; then
54                unzip 110m-admin-0-boundary-lines.zip -d world_boundaries
55        else
56                echo '110m-admin-0-boundary-lines.zip not present'
57        fi
58
59fi
Note: See TracBrowser for help on using the repository browser.