File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ DIFF_FILE=/db/diffs/changes.osc
88OVERPASS_META=${OVERPASS_META:- no}
99OVERPASS_COMPRESSION=${OVERPASS_COMPRESSION:- gz}
1010OVERPASS_FLUSH_SIZE=${OVERPASS_FLUSH_SIZE:- 16}
11+ OVERPASS_DIFF_PREPROCESS=${OVERPASS_DIFF_PREPROCESS:- }
1112
1213if [ -z " $OVERPASS_DIFF_URL " ]; then
1314 echo " No OVERPASS_DIFF_URL set. Skipping update."
5960 if [[ -s ${DIFF_FILE} ]]; then
6061 VERSION=$( osmium fileinfo -e -g data.timestamp.last " ${DIFF_FILE} " || (cp -f /db/replicate_id.backup /db/replicate_id && echo " Broken file" && cat " ${DIFF_FILE} " && rm -f " ${DIFF_FILE} " && exit 1))
6162 if [[ -n " ${VERSION// / } " ]]; then
63+ # Check if an Preprocessing command exists and try to execute it
64+ if [[ -n ${OVERPASS_DIFF_PREPROCESS+x} ]]; then
65+ echo " Running preprocessing command: ${OVERPASS_DIFF_PREPROCESS} "
66+ eval " ${OVERPASS_DIFF_PREPROCESS} "
67+ fi
6268 echo /app/bin/update_from_dir --osc-dir=" $( dirname ${DIFF_FILE} ) " --version=" ${VERSION} " " ${UPDATE_ARGS[@]} "
6369 /app/bin/update_from_dir --osc-dir=" $( dirname ${DIFF_FILE} ) " --version=" ${VERSION} " " ${UPDATE_ARGS[@]} "
6470 else
You can’t perform that action at this time.
0 commit comments