2 files changed, 10 insertions(+), 1 deletions(-)
M .gitignore
M aoc
M .gitignore => .gitignore +1 -0
@@ 1,1 1,2 @@
*.so
+.event
M aoc => aoc +9 -1
@@ 7,7 7,15 @@ RUNNERS_DIR=$SCRIPT_DIR/run
TEMPLATES_DIR=$SCRIPT_DIR/templates
ROOT=${ROOT-$SCRIPT_DIR}
-EVENT=${EVENT-$(date +%Y)}
+EVENT=${EVENT-}
+if [ -z "$EVENT" ]; then
+ if [ -f "$ROOT/.event" ]; then
+ EVENT=$(<"$ROOT/.event")
+ else
+ EVENT=$(date +%Y)
+ fi
+fi
+
DEFAULT_SUFFIX=${DEFAULT_SUFFIX-hs}
SUFFIX=${SUFFIX-$DEFAULT_SUFFIX}
ACTION=edit