From: Brett Parker Date: Tue, 8 Dec 2020 00:50:31 +0000 (+0000) Subject: Add some notes and set the default file X-Git-Url: https://git.sommitrealweird.co.uk/advent-of-code-2019.git/commitdiff_plain/8d19ec771c083ce8bbfff9b075d42f15ad704831 Add some notes and set the default file --- diff --git a/day10/check_asteroids.sh b/day10/check_asteroids.sh old mode 100644 new mode 100755 index d333a33..84958ed --- a/day10/check_asteroids.sh +++ b/day10/check_asteroids.sh @@ -3,7 +3,8 @@ 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 diff --git a/day10/notes.txt b/day10/notes.txt new file mode 100644 index 0000000..f918aab --- /dev/null +++ b/day10/notes.txt @@ -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