Revision 11561
Added by Paul Sarando about 11 years ago
geoscrub.sh | ||
---|---|---|
23 | 23 |
echo "-d, --dbname=DBNAME database name psql commands will connect to" >&2 |
24 | 24 |
echo "-h, --host=HOSTNAME database server host or socket directory" >&2 |
25 | 25 |
echo "-U, --username=USERNAME database user name" >&2 |
26 |
echo "Input Data Options:" >&2 |
|
27 |
echo "-i, --geoscrub-input Geoscrub input directory (default: ${HOME}/geoscrub_input)" >&2 |
|
28 |
echo " Delete this directory, or the input CSV in it," >&2 |
|
29 |
echo " to re-download the data." >&2 |
|
26 | 30 |
exit 1; |
27 | 31 |
} |
28 | 32 |
|
... | ... | |
67 | 71 |
DB_NAME="${1#*=}" |
68 | 72 |
shift |
69 | 73 |
;; |
74 |
-i) |
|
75 |
if [[ -z $2 ]]; then |
|
76 |
echo "Option $1 requires an argument." >&2 |
|
77 |
usage |
|
78 |
fi |
|
79 |
GEOSCRUB_INPUT_OPT="-i $2" |
|
80 |
shift 2 |
|
81 |
;; |
|
82 |
--geoscrub-input=*) |
|
83 |
GEOSCRUB_INPUT_OPT="$1" |
|
84 |
shift |
|
85 |
;; |
|
70 | 86 |
*) |
71 | 87 |
echo "Invalid option: $1" >&2 |
72 | 88 |
usage |
... | ... | |
84 | 100 |
fi |
85 | 101 |
} |
86 | 102 |
|
87 |
"${SCRIPT_DIR}"/load-geoscrub-input.sh -U "$DB_USER" $DB_HOST_OPT -d "$DB_NAME" |
|
103 |
"${SCRIPT_DIR}"/load-geoscrub-input.sh -U "$DB_USER" $DB_HOST_OPT -d "$DB_NAME" $GEOSCRUB_INPUT_OPT
|
|
88 | 104 |
if [[ $? != 0 ]]; then |
89 | 105 |
echo "Could not load ${DB_NAME} database with geonames.org data." |
90 | 106 |
exit 1 |
Also available in: Unified diff
Added biengeo script options for data directories.
Added GADM and geonames.org data dir options to
update_validation_data.sh scripts.
Added geoscrub input data dir option to geoscrub.sh scripts.