diff --git a/apsalar/icloudsync b/apsalar/icloudsync index a5a27fc..a5a4b65 100755 --- a/apsalar/icloudsync +++ b/apsalar/icloudsync @@ -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"