Skip to content

Commit

Permalink
Update migration-script-ubuntu.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
JayanaGunaweera01 committed Jun 27, 2023
1 parent b7ebf5f commit 9a16e42
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ cd IS_HOME_OLD
echo "${GREEN}==> Navigated to home folder successfully${RESET}"

# Download needed wso2IS zip

# Specify the Google Drive file URL
file_url="$urlOld"

Expand All @@ -96,12 +97,17 @@ api_key="$migrationApiKey"
# Extract the file ID from the URL
file_id=$(echo "$file_url" | awk -F'/' '{print $NF}' | awk -F'=' '{print $2}')

# Specify the export URL
export_url="https://www.googleapis.com/drive/v3/files/$file_id/export?mimeType=application%2Fzip"

# Provide the correct output file path for the downloaded file
output_file="wso2is.zip"

curl -k -H "Authorization: Bearer $api_key" \
"https://www.googleapis.com/drive/v3/files/$file_id?alt=media" \
-o "$output_file"
# Download the file using cURL and the API key
curl -L -o "$output_file" "$export_url&key=$api_key"

echo "Downloading using API key..."
pwd

echo "Downloading using API key.."
pwd
Expand Down

0 comments on commit 9a16e42

Please sign in to comment.