forked from PhongT16/outlook_calendar_report_generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 22: Removed parameter checking
- Loading branch information
Showing
1 changed file
with
1 addition
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,2 @@ | ||
#!/bin/bash | ||
CONFIG_FILE=/root/vacation_calendar_sync_config.yaml | ||
REQUIRED_PARAMETERS="client_id tenant_id recipient_email scopes group_name shared_calendar_name category_name category_color vcs_directory AM_config PM config days_out update_interval email_list_update_interval" | ||
|
||
if [[ -f "$CONFIG_FILE" ]]; then | ||
for i in $REQUIRED_PARAMETERS; do | ||
result=$(grep -q $i $CONFIG_FILE; echo $?) | ||
if [ "$result" -ne 0 ]; then | ||
echo $i is missing | ||
exit 1 | ||
fi | ||
done | ||
python3 OutlookCalendar.py -s | ||
else | ||
echo Need config file named vacation_calendar_sync_config at your local home directory | ||
fi | ||
python3 OutlookCalendar.py -s |