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
16
16
D=${2}
17
17
elif [ " $# " -eq 3 ]; then
18
18
D=${2}
19
- POSTAL=${3}
19
+ EXTRA_POST=${3}
20
+ elif [ " $# " -eq 4 ]; then
21
+ D=${2}
22
+ EXTRA_POST=${3}
23
+ POSTAL=${4}
20
24
else
21
- echo " Usage: ./import_pbf.sh openstreetmapfilename [imported-dir-name]"
25
+ echo " Usage: ./import_pbf.sh openstreetmapfilename [imported-dir-name] [extra_postcodes] [libpostal_country] "
22
26
exit 0
23
27
fi
24
28
@@ -39,8 +43,10 @@ for module in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 22; do
39
43
done
40
44
# "$PROGPATH"/libosmscout/install/bin/Import --altLangOrder en --typefile "$PROGPATH"/stylesheet/map.ost --destinationDirectory "$D"/tmp "$1"
41
45
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 "
44
50
else
45
51
" $PROGPATH " /importer " $D " /tmp " $D " " $PROGPATH " /stylesheet/whitelist
46
52
fi
Original file line number Diff line number Diff line change @@ -900,7 +900,7 @@ int main(int argc, char* argv[])
900
900
901
901
if (argc<4 )
902
902
{
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 " ;
904
904
std::cerr << " When using optional parameters, you have to specify all of the perceiving ones\n " ;
905
905
return 1 ;
906
906
}
You can’t perform that action at this time.
0 commit comments