cron job tweaks
parent
01fda372f3
commit
f94d3db5ce
9
cron.sh
9
cron.sh
|
@ -1,6 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# install me in your crontab!
|
||||
# 0 5 1-25 12 * $HOME/adventofcode2023/cron.sh auto
|
||||
|
||||
year=2023
|
||||
root=~/adventofcode${year}
|
||||
|
||||
|
@ -40,7 +43,11 @@ if test -e "$dir"; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
cwd=${PWD:-`pwd`}
|
||||
if ! test -e "$root/cookie"; then
|
||||
echo >&2 "warning: cookiefile '$root/cookie' not found. consider creating it"
|
||||
fi
|
||||
|
||||
cwd=${PWD:-$(pwd)}
|
||||
mkdir "$dir"
|
||||
cd "$dir" || exit 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue