From 21a5ae826a6a5ae5ef456e4b0dc443cbf847255f Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Mon, 10 Jul 2023 11:59:21 +0200 Subject: [PATCH] chore: support downloading multiple contests Signed-off-by: Matej Focko --- make_contest.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/make_contest.sh b/make_contest.sh index 6565378..eba15bf 100644 --- a/make_contest.sh +++ b/make_contest.sh @@ -1,4 +1,11 @@ #!/bin/sh -mkdir $1 -curl -Lk https://codeforces.com/contest/$1/problems -o $1/index.html \ No newline at end of file +function get_contest() { + mkdir $1 + curl -Lk https://codeforces.com/contest/$1/problems -o $1/index.html +} + +for contest in "$@" +do + get_contest $contest; +done