Adding basic envvar checking

This commit is contained in:
Siina Mashek 2024-10-14 10:56:58 +03:00
parent 61882cca82
commit 69963e62ba

View File

@ -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"