diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-06-26 09:47:23 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-06-26 23:37:23 +0200 |
| commit | fa26f694d8cf98272763952a698301ee9935c19e (patch) | |
| tree | 5af7a788fb8e9fa12b2b2fbea64250ed496a23c0 /2022/run.sh | |
| parent | f0159b7d36e2c81182f2d047a34bf883394894db (diff) | |
| download | aoc-fa26f694d8cf98272763952a698301ee9935c19e.tar.gz aoc-fa26f694d8cf98272763952a698301ee9935c19e.zip | |
Added 2022, first few problems
Diffstat (limited to '')
| -rwxr-xr-x | 2022/run.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/2022/run.sh b/2022/run.sh new file mode 100755 index 0000000..56e1177 --- /dev/null +++ b/2022/run.sh | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | usage() { | ||
| 4 | echo "Usage: $0 day part" | ||
| 5 | echo "Example: $0 07 b" | ||
| 6 | } | ||
| 7 | |||
| 8 | [ -n "$1" ] && [ -n "$2" ] || (usage; exit 1) | ||
| 9 | [ -d "$1" ] || (echo "Directory $1 does not exist"; exit 1) | ||
| 10 | [ -f "$1/$2.rs" ] || (echo "File $1/$2.rs does not exist"; exit 2) | ||
| 11 | |||
| 12 | rustc "$1/$2.rs" -o "$1/$2.out" && time "./$1/$2.out" | ||
