Skip to content

Commit 0a19533

Browse files
Adding script for downloading dumps on Linux.
1 parent f0122e6 commit 0a19533

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

dumps/download.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
dumps_version="dumps_3"
3+
ARTIFACTS_USER='cidownload'
4+
ARTIFACTS_PASSWORD='AP6JaG9ToerxBc7gWP5LcU1CNpb'
5+
ARTIFACTS_URL="https://sharpdebug.jfrog.io/sharpdebug/api/storage/generic-local/$dumps_version/"
6+
7+
command -v curl >/dev/null 2>&1 || { echo "Please install 'curl'." >&2; exit 1; }
8+
command -v unzip >/dev/null 2>&1 || { echo "Please install 'unzip'." >&2; exit 1; }
9+
10+
files=$(curl -u$ARTIFACTS_USER:$ARTIFACTS_PASSWORD $ARTIFACTS_URL 2>/dev/null | grep -Po '(?<="uri" : "/)[^"]*')
11+
for file in $files ; do
12+
url="https://sharpdebug.jfrog.io/sharpdebug/generic-local/$dumps_version/$file"
13+
echo $url '-->' $file
14+
curl -u$ARTIFACTS_USER:$ARTIFACTS_PASSWORD $url --output $file 2>/dev/null
15+
extract_path=$(pwd)
16+
if grep -q clr "$file"; then
17+
subfolder="${file%.*}"
18+
extract_path="$extract_path/$subfolder"
19+
fi
20+
unzip -qo $file -d $extract_path
21+
rm $file
22+
done

0 commit comments

Comments
 (0)