From 8d19ec771c083ce8bbfff9b075d42f15ad704831 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Tue, 8 Dec 2020 00:50:31 +0000 Subject: [PATCH] Add some notes and set the default file --- day10/check_asteroids.sh | 3 ++- day10/notes.txt | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 day10/check_asteroids.sh create mode 100644 day10/notes.txt 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 -- 2.39.5