aboutsummaryrefslogtreecommitdiff
path: root/2022/run.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-06-26 09:47:23 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-06-26 23:37:23 +0200
commitfa26f694d8cf98272763952a698301ee9935c19e (patch)
tree5af7a788fb8e9fa12b2b2fbea64250ed496a23c0 /2022/run.sh
parentf0159b7d36e2c81182f2d047a34bf883394894db (diff)
downloadaoc-fa26f694d8cf98272763952a698301ee9935c19e.tar.gz
aoc-fa26f694d8cf98272763952a698301ee9935c19e.zip
Added 2022, first few problems
Diffstat (limited to '2022/run.sh')
-rwxr-xr-x2022/run.sh12
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
3usage() {
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
12rustc "$1/$2.rs" -o "$1/$2.out" && time "./$1/$2.out"

Generated with cgit - Back to sebastiano.tronto.net