8 (( $# >= 2 )) || die
"Usage: $0 TOKEN-FILE SYMBOL-ARCHIVE..."
12 [[ -f $token && -s $token ]] || die
"Invalid TOKEN-FILE ${token@Q}"
15 [[ $
(file -SEbi "$zip") == application
/zip* ]] || die
"Invalid SYMBOL-ARCHIVE ${zip@Q}"
19 echo >&2 "Uploading ${zip@Q} ..."
20 curl
-X POST
-H "Auth-Token: $(<"$token")" -F "${zip##*/}=@$zip" \
21 --retry 4 --retry-connrefused --connect-timeout 120 \
22 https
://symbols.mozilla.org
/upload
/
24 mv -v "$zip" "$zip.uploaded"