#!/bin/bash export PATH="$HOME/.local/bin:$PATH" export HF_TOKEN=HF_TOKEN_PLACEHOLDER # wait for any running noselleel download to finish while pgrep -f "hf download ehabnegm/noselleel" >/dev/null; do sleep 30; done for D in noselleel-egyptian-tts eqkawkab-egyptian-tts moustafa-sadek-egyptian-tts mosaifside-egyptian-tts; do for attempt in 1 2 3 4 5 6 7 8; do echo "=== $D attempt $attempt $(date) ===" if hf download ehabnegm/$D --repo-type dataset --local-dir /opt/work/data_raw/$D --max-workers 4; then echo "=== $D DONE ==="; break fi echo "=== $D failed, backoff $((attempt*60))s ===" sleep $((attempt*60)) done done echo "ALL_QUEUE_DONE"