diff options
Diffstat (limited to 'plan')
| -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" |