]> git.sommitrealweird.co.uk Git - advent-of-code-2019.git/commitdiff
Add some notes and set the default file
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Tue, 8 Dec 2020 00:50:31 +0000 (00:50 +0000)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Tue, 8 Dec 2020 00:50:31 +0000 (00:50 +0000)
day10/check_asteroids.sh [changed mode: 0644->0755]
day10/notes.txt [new file with mode: 0644]

old mode 100644 (file)
new mode 100755 (executable)
index d333a33..84958ed
@@ -3,7 +3,8 @@
 set -u
 set -e
 
 set -u
 set -e
 
-filename=${1:-small_grid.txt}
+basedir=$(dirname $(readlink -f ${BASH_SOURCE}))
+filename=${1:-$basedir/3_4_8.txt}
 
 exec 3<$filename
 
 
 exec 3<$filename
 
diff --git a/day10/notes.txt b/day10/notes.txt
new file mode 100644 (file)
index 0000000..f918aab
--- /dev/null
@@ -0,0 +1,4 @@
+Files in the directory, other than input.txt, are named by the standard convention: x_y_asteroids.txt
+
+The script, check_asteroids.sh, can take a filename as the first parameter, if it's not specified it'll
+run 3_4_8.txt