Skip to content

Commit c70f302

Browse files
committed
Update storage account used in upload script
1 parent be7928f commit c70f302

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

import_digiroad_shapefiles.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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.
1818
if [[ ! -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

upload_routing_dump_to_azure.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ az account set --subscription "jore4"
1919
if ! 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
2727
Upload 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").
3232
EOF
3333
exit 2
@@ -36,6 +36,6 @@ fi
3636
# List all artifacts inside `jore4-digiroad` in blob storage container.
3737
az storage blob list \
3838
--container-name "jore4-digiroad" \
39-
--account-name "jore4storage" \
39+
--account-name "stjore4dev001" \
4040
--auth-mode "login" \
4141
--query "[].name"

0 commit comments

Comments
 (0)