diff options
author | Nate Buttke <nate-web@riseup.net> | 2022-11-05 23:07:24 -0700 |
---|---|---|
committer | Nate Buttke <nate-web@riseup.net> | 2022-11-05 23:07:24 -0700 |
commit | 2f53a4f209aa6106d360dcddf52f5bb81257d830 (patch) | |
tree | 2d582787e0201ca5367876a5154cf4784549c1a4 | |
parent | f1cb2f99e7300b223927e046b4f954100c292747 (diff) |
plan made more succinct again
-rwxr-xr-x | plan | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -8,15 +8,13 @@ fi if date +%a | grep -q Mon ; then # today is monday date=$(date --date="This Mon" +%b%d | tr A-Z a-z) printf "today is monday.\n" - if [ "$1" == next ]; then - date=$(date --date="$date + 1 week" +%b%d | tr A-Z a-z) - fi else # today is NOT monday date=$(date --date="Last Mon" +%b%d | tr A-Z a-z) printf "today is NOT monday.\n" - if [ "$1" == next ]; then - date=$(date --date="$date + 1 week" +%b%d | tr A-Z a-z) - fi +fi + +if [ "$1" == next ]; then + date=$(date --date="$date + 1 week" +%b%d | tr A-Z a-z) fi filepath="/home/n8/dox/plan/weekly/$date/$date" |