aboutsummaryrefslogtreecommitdiff
path: root/2022
diff options
context:
space:
mode:
authorj-james2022-11-30 21:56:44 +0000
committerj-james2022-11-30 21:56:44 +0000
commit241862464a8ab03178aee3a270b362bc889a2599 (patch)
tree2cb4e70ff63d4db348cb2cdf88ad1a0b0c960337 /2022
parentf3be246c4e7d79df669fbf3c48710620d1c361d5 (diff)
Create watch script
Diffstat (limited to '2022')
-rwxr-xr-x2022/get2
-rwxr-xr-x2022/run2
-rwxr-xr-x2022/vars2
-rwxr-xr-x2022/watch7
4 files changed, 10 insertions, 3 deletions
diff --git a/2022/get b/2022/get
index 48f39d6..b1eff41 100755
--- a/2022/get
+++ b/2022/get
@@ -13,4 +13,4 @@ cp "nim/day${DAY}/input.txt" "rust/day${DAY}/src/input.txt"
subl -a "nim/day${DAY}/input.txt"
subl -a "nim/day${DAY}/main.nim"
-chromium "https://adventofcode.com/${YEAR}/day/$((10#${DAY}))"
+# chromium "https://adventofcode.com/${YEAR}/day/$((10#${DAY}))"
diff --git a/2022/run b/2022/run
index a3d77e4..45f80aa 100755
--- a/2022/run
+++ b/2022/run
@@ -2,4 +2,4 @@
source "vars"
-nim c -r "nim/day${DAY}/main.nim" "nim/day${DAY}/input.txt"
+nim c --warnings:off --hints:off -r "nim/day${DAY}/main.nim" "nim/day${DAY}/input.txt"
diff --git a/2022/vars b/2022/vars
index e29495c..31e8b53 100755
--- a/2022/vars
+++ b/2022/vars
@@ -1,4 +1,4 @@
#!/bin/bash
DAY="01"
-YEAR="2021"
+YEAR="2022"
diff --git a/2022/watch b/2022/watch
new file mode 100755
index 0000000..3792b58
--- /dev/null
+++ b/2022/watch
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+source "vars"
+
+while inotifywait --quiet --event modify "~/watched_file"
+do ./run
+done