# Step 1: Get the token by making a request to the API | |
TOKEN=$(curl -s https://acdc.vision.ee.ethz.ch/api/getPackageUri/6436f2259880d97633275dfc | jq -r '.token') | |
# Step 2: Use the token to download the file using wget | |
if [ -n "$TOKEN" ]; then | |
wget "https://acdc.vision.ee.ethz.ch/api/downloadPackage/${TOKEN}/rgb_anon_trainvaltest.zip" -O ./datasets/acdc.zip | |
unzip ./datasets/acdc.zip -d ./datasets/ | |
# rename datasets/rgb_anon to datasets/acdc | |
mv ./datasets/rgb_anon ./datasets/acdc | |
else | |
echo "Failed to retrieve token" | |
exit 1 | |
fi | |