diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-30 16:08:27 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2024-09-30 16:08:27 +0530 |
commit | 3496b0ed08c51e37e135e686b1632fd86f930c2c (patch) | |
tree | 1da44792489607070f3b4ca14d82af05b73e362b /upload.sh |
(init): Initialize repository.
Diffstat (limited to 'upload.sh')
-rwxr-xr-x | upload.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/upload.sh b/upload.sh new file mode 100755 index 0000000..9fdbea6 --- /dev/null +++ b/upload.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +shopt -s extglob + +if [[ "$1" != '' ]]; then + cd $1 +fi + +echo "Start upload: $(date)" +echo + +for i in *.zip; do + echo "Uploading $i" + curl 'http://cmp.compromyse.xyz/jury/import-export' \ + -X POST \ + -H "Cookie: PHPSESSID=$2" \ + -F 'problem_upload[contest]=' \ + -F "problem_upload[archive]=@$i" \ + -F 'problem_upload[upload]=' +done + +echo +echo "End upload: $(date)" |