echo "✅ Config file downloaded and verified: $DEST_DIR/$FILE_NAME" # ------------------------------------------------- # LMC 8.4 – R18 config file download (PowerShell) # -------------------------------------------------
#--- Perform download ---------------------------------------------------- HTTP_RESPONSE=$(curl -sS -w "%http_code" -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/x-yaml" \ -o "$FILE_NAME" "$URL")
#--- Create destination folder (if needed) ------------------------------- mkdir -p "$DEST_DIR" cd "$DEST_DIR" || echo "❌ Cannot cd to $DEST_DIR"; exit 1;
#--- Check HTTP status --------------------------------------------------- if [[ "$HTTP_RESPONSE" != "200" ]]; then echo "❌ Download failed – HTTP $HTTP_RESPONSE" exit 1 fi
if ($response.StatusCode -ne 200) Write-Error "❌ HTTP $($response.StatusCode) – download failed" exit 1
echo "✅ Config file downloaded and verified: $DEST_DIR/$FILE_NAME" # ------------------------------------------------- # LMC 8.4 – R18 config file download (PowerShell) # -------------------------------------------------
#--- Perform download ---------------------------------------------------- HTTP_RESPONSE=$(curl -sS -w "%http_code" -H "Authorization: Bearer $API_KEY" \ -H "Accept: application/x-yaml" \ -o "$FILE_NAME" "$URL")
#--- Create destination folder (if needed) ------------------------------- mkdir -p "$DEST_DIR" cd "$DEST_DIR" || echo "❌ Cannot cd to $DEST_DIR"; exit 1;
#--- Check HTTP status --------------------------------------------------- if [[ "$HTTP_RESPONSE" != "200" ]]; then echo "❌ Download failed – HTTP $HTTP_RESPONSE" exit 1 fi
if ($response.StatusCode -ne 200) Write-Error "❌ HTTP $($response.StatusCode) – download failed" exit 1
