-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding script for downloading dumps on Linux.
- Loading branch information
1 parent
f0122e6
commit 0a19533
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
dumps_version="dumps_3" | ||
ARTIFACTS_USER='cidownload' | ||
ARTIFACTS_PASSWORD='AP6JaG9ToerxBc7gWP5LcU1CNpb' | ||
ARTIFACTS_URL="https://sharpdebug.jfrog.io/sharpdebug/api/storage/generic-local/$dumps_version/" | ||
|
||
command -v curl >/dev/null 2>&1 || { echo "Please install 'curl'." >&2; exit 1; } | ||
command -v unzip >/dev/null 2>&1 || { echo "Please install 'unzip'." >&2; exit 1; } | ||
|
||
files=$(curl -u$ARTIFACTS_USER:$ARTIFACTS_PASSWORD $ARTIFACTS_URL 2>/dev/null | grep -Po '(?<="uri" : "/)[^"]*') | ||
for file in $files ; do | ||
url="https://sharpdebug.jfrog.io/sharpdebug/generic-local/$dumps_version/$file" | ||
echo $url '-->' $file | ||
curl -u$ARTIFACTS_USER:$ARTIFACTS_PASSWORD $url --output $file 2>/dev/null | ||
extract_path=$(pwd) | ||
if grep -q clr "$file"; then | ||
subfolder="${file%.*}" | ||
extract_path="$extract_path/$subfolder" | ||
fi | ||
unzip -qo $file -d $extract_path | ||
rm $file | ||
done |