Adding basic envvar checking
This commit is contained in:
parent
61882cca82
commit
69963e62ba
1 changed files with 11 additions and 0 deletions
|
@ -9,6 +9,17 @@ if ! type icloudpd >/dev/null; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure environment variables are set
|
||||
if [[ -z "$ICLOUD_DIR" ]]; then
|
||||
echo 'please set $ICLOUD_DIR'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$ICLOUD_USERNAME" ]]; then
|
||||
echo 'please set $ICLOUD_USERNAME'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# tmux session name
|
||||
session="icloudsync"
|
||||
|
||||
|
|
Loading…
Reference in a new issue