File tree 3 files changed +5
-7
lines changed 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
# This script is for updating the meeting date every third Sunday
4
- # Add to crontab like so: 0 0 15-21 * * [`date+%a`== Sun]&& /path/to/meetingDate.sh
4
+ # Add to crontab like so: 0 0 15-21 * * Sun /path/to/meetingDate.sh
5
5
6
6
todayYr=date+%Y
7
7
todayMth=date+%m
8
- /path/to/utils/cronscripts/updateDate.sh todayYr todayMth /path/to/git/clone/site
8
+ /path/to/utils/cronscripts/updateDate.sh $ todayYr $ todayMth /path/to/git/clone/site
Original file line number Diff line number Diff line change 129
129
MonthCheck $2
130
130
NY=$1
131
131
NM=$2
132
- oldDay=` cal $2 $1 | tail +5 | cut -c19,20| sed -n 1p`
132
+ oldDay=` cal $2 $1 | tail -4 | cut -c19,20| sed -n 1p`
133
133
oldMthStr=$( MonthStr ${NM} )
134
134
oldDate=" $oldMthStr $( LastDigit ${oldDay} ) , $NY "
135
135
oldDay=$(( oldDay- 1 ))
144
144
newMth=" 1"
145
145
fi
146
146
147
- newDay=` cal $newMth $newYr | tail +5 | cut -c19,20| sed -n 1p`
147
+ newDay=` cal $newMth $newYr | tail -4 | cut -c19,20| sed -n 1p`
148
148
newMthStr=$( MonthStr ${newMth} )
149
149
newDate=" $newMthStr $( LastDigit ${newDay} ) , $newYr "
150
150
saveDate=" $newYr$newMth$newDay "
@@ -159,11 +159,9 @@ else
159
159
git push origin
160
160
161
161
# update the email reminder
162
- $PWD /updateMonthlyEmails .sh email-content.txt " ${oldDate} " " ${newDate} "
162
+ $PWD /updateMonthlyEmail .sh email-content.txt " ${oldDate} " " ${newDate} "
163
163
164
164
# write new date to file
165
- rm -f $PWD /nextDate.txt
166
- touch $PWD /nextDate.txt
167
165
echo $saveDate > $PWD /nextDate.txt
168
166
169
167
You can’t perform that action at this time.
0 commit comments