File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,9 +17,27 @@ DOWNLOAD_TARGET_FILE="${DOWNLOAD_TARGET_DIR}/${AREA}_R.zip"
1717# Load zip file containing Digiroad shapefiles if it does not exist.
1818if [[ ! -f " $DOWNLOAD_TARGET_FILE " ]]; then
1919 mkdir -p " $DOWNLOAD_TARGET_DIR "
20- curl -Lo " $DOWNLOAD_TARGET_FILE " " $SHP_URL "
20+ COOKIE_JAR=" ${DOWNLOAD_TARGET_DIR} /curl.cookies"
21+ set +e
22+ output=$( curl -L -c " $COOKIE_JAR " -b " $COOKIE_JAR " -o " $DOWNLOAD_TARGET_FILE " " $SHP_URL " 2>&1 )
23+ exit_code=$?
24+
25+ if [[ $exit_code -ne 0 ]]; then
26+ rm $COOKIE_JAR
27+ echo " Error downloading shapefile zip file from $SHP_URL . Curl exit code: $exit_code "
28+ exit $exit_code
29+ fi
30+
31+
32+ DIGIROAD_IRROTUS_NRO=$( curl -sL -c " $COOKIE_JAR " -b " $COOKIE_JAR " " $IRROTUS_NRO_URL " 2>&1 )
33+ exit_code=$?
34+ rm $COOKIE_JAR
35+ set -e
36+ if [[ $exit_code -ne 0 ]]; then
37+ echo " Error downloading irrotus_nro file from $IRROTUS_NRO_URL . Curl exit code: $exit_code "
38+ exit $exit_code
39+ fi
2140
22- DIGIROAD_IRROTUS_NRO=$( curl -sL " $IRROTUS_NRO_URL " )
2341 if [[ ! -f " ${DOWNLOAD_TARGET_DIR} /digiroad_${DIGIROAD_IRROTUS_NRO} .txt" ]]; then
2442 echo $DIGIROAD_IRROTUS_NRO > " ${DOWNLOAD_TARGET_DIR} /digiroad_${DIGIROAD_IRROTUS_NRO} .txt"
2543 fi
Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ az account set --subscription "jore4"
1919if ! time az storage azcopy blob upload \
2020 --source " ${SQL_FILE} " \
2121 --recursive \
22- --account-name " jore4storage " \
22+ --account-name " stjore4dev001 " \
2323 --auth-mode " login" \
2424 --container " jore4-digiroad" ; then
2525 cat << EOF
2626
2727Upload failed. Please make sure that you have installed a version of Azure CLI, which is known to work
2828(e.g. 2.29.2, may require downgrade).
2929
30- Alternatively you may perform the upload manually in the azure portal (storage account "jore4storage ", container
30+ Alternatively you may perform the upload manually in the azure portal (storage account "stjore4dev001 ", container
3131"jore4-digiroad").
3232EOF
3333 exit 2
3636# List all artifacts inside `jore4-digiroad` in blob storage container.
3737az storage blob list \
3838 --container-name " jore4-digiroad" \
39- --account-name " jore4storage " \
39+ --account-name " stjore4dev001 " \
4040 --auth-mode " login" \
4141 --query " [].name"
You can’t perform that action at this time.
0 commit comments