Adding basic envvar checking
This commit is contained in:
parent
61882cca82
commit
69963e62ba
|
@ -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 New Issue