summaryrefslogtreecommitdiff
path: root/convert
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-15 09:06:00 +0200
committerErich Eckner <git@eckner.net>2018-05-15 09:06:00 +0200
commit2bbcd8433284dd24154654e1d6bb61d6bb2e4c63 (patch)
tree4420c9c78e8ae6f24aaf2fb51160b9ec64b31aeb /convert
parent3a8859c84e230fed23903ab63fe2936c05f96ee9 (diff)
downloadosm-to-garmin-2bbcd8433284dd24154654e1d6bb61d6bb2e4c63.tar.xz
convert: make target area configurable
Diffstat (limited to 'convert')
-rwxr-xr-xconvert51
1 files changed, 38 insertions, 13 deletions
diff --git a/convert b/convert
index 75598f6..e9fb673 100755
--- a/convert
+++ b/convert
@@ -9,19 +9,44 @@ then
fi
mainUrl='https://download.geofabrik.de/europe/'
-countries=(
- austria
- belgium
- croatia
- czech-republic
- germany
- italy
- luxembourg
- netherlands
- poland
- slovakia
- slovenia
-)
+
+case "$1" in
+ '')
+ countries=(
+ austria
+ germany
+ italy
+ switzerland
+ )
+ ;;
+ 'benelux')
+ countries=(
+ belgium
+ luxembourg
+ netherlands
+ )
+ ;;
+ 'fast')
+ mainUrl="${mainUrl}germany/"
+ countries=(
+ thueringen
+ )
+ ;;
+ 'gus')
+ countries=(
+ croatia
+ czech-republic
+ poland
+ slovakia
+ slovenia
+ )
+ ;;
+ *)
+ >&2 printf 'Unknown option "%s".\n' "$1"
+ exit 1
+ ;;
+esac
+
numJobs=$(($(/usr/bin/getconf _NPROCESSORS_ONLN)/2))
if [ ${numJobs} -lt 1 ]
then