File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,13 @@ elif [ "$#" -eq 2 ]; then
1616 D=${2}
1717elif [ " $# " -eq 3 ]; then
1818 D=${2}
19- POSTAL=${3}
19+ EXTRA_POST=${3}
20+ elif [ " $# " -eq 4 ]; then
21+ D=${2}
22+ EXTRA_POST=${3}
23+ POSTAL=${4}
2024else
21- echo " Usage: ./import_pbf.sh openstreetmapfilename [imported-dir-name]"
25+ echo " Usage: ./import_pbf.sh openstreetmapfilename [imported-dir-name] [extra_postcodes] [libpostal_country] "
2226 exit 0
2327fi
2428
@@ -39,8 +43,10 @@ for module in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 22; do
3943done
4044# "$PROGPATH"/libosmscout/install/bin/Import --altLangOrder en --typefile "$PROGPATH"/stylesheet/map.ost --destinationDirectory "$D"/tmp "$1"
4145
42- if [ " $# " -eq 3 ]; then
43- " $PROGPATH " /importer " $D " /tmp " $D " " $PROGPATH " /stylesheet/whitelist " $POSTAL "
46+ if [ " $# " -eq 4 ]; then
47+ " $PROGPATH " /importer " $D " /tmp " $D " " $PROGPATH " /stylesheet/whitelist " $EXTRA_POST " " $POSTAL "
48+ elif [ " $# " -eq 3 ]; then
49+ " $PROGPATH " /importer " $D " /tmp " $D " " $PROGPATH " /stylesheet/whitelist " $EXTRA_POST "
4450else
4551 " $PROGPATH " /importer " $D " /tmp " $D " " $PROGPATH " /stylesheet/whitelist
4652fi
Original file line number Diff line number Diff line change @@ -900,7 +900,7 @@ int main(int argc, char* argv[])
900900
901901 if (argc<4 )
902902 {
903- std::cerr << " importer <libosmscout map directory> <geocoder-nlp database directory> <whitelist file> [postal_codes.csv] [< postal_country_parser_code> ] [address_parser_directory] [verbose]\n " ;
903+ std::cerr << " importer <libosmscout map directory> <geocoder-nlp database directory> <whitelist file> [postal_codes.csv] [postal_country_parser_code] [address_parser_directory] [verbose]\n " ;
904904 std::cerr << " When using optional parameters, you have to specify all of the perceiving ones\n " ;
905905 return 1 ;
906906 }
You can’t perform that action at this time.
0 commit comments