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,7 +17,17 @@ 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+ rm $COOKIE_JAR
25+ set -e
26+
27+ if [[ $exit_code -ne 0 ]]; then
28+ echo " Error downloading shapefile zip file from $SHP_URL . Curl exit code: $exit_code "
29+ exit $exit_code
30+ fi
2131
2232 DIGIROAD_IRROTUS_NRO=$( curl -sL " $IRROTUS_NRO_URL " )
2333 if [[ ! -f " ${DOWNLOAD_TARGET_DIR} /digiroad_${DIGIROAD_IRROTUS_NRO} .txt" ]]; then
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