32 lines
No EOL
794 B
Bash
Executable file
32 lines
No EOL
794 B
Bash
Executable file
#!/bin/bash
|
|
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
|
cd "$parent_path"
|
|
|
|
# Import variables
|
|
set -a
|
|
source .env
|
|
set +a
|
|
|
|
VERSION=1.23.0
|
|
FILE=icloudpd-$VERSION-linux-amd64
|
|
|
|
if [ ! -f $FILE ]; then
|
|
echo "icloudpd missing, downloading"
|
|
wget https://github.com/icloud-photos-downloader/icloud_photos_downloader/releases/download/v$VERSION/icloudpd-$VERSION-linux-amd64
|
|
chmod +x $FILE
|
|
fi
|
|
|
|
echo "Syncing iCloud Photos"
|
|
|
|
./$FILE --directory $PHOTO_FOLDER \
|
|
--username "$APPLE_EMAIL" \
|
|
--password "$APPLE_PASSWORD" \
|
|
--library "$APPLE_LIBRARY" \
|
|
--recent 500 \
|
|
--until-found 10 \
|
|
--set-exif-datetime \
|
|
--folder-structure none \
|
|
--file-match-policy name-size-dedup-with-suffix \
|
|
--skip-live-photos
|
|
|
|
echo "Completed Syncing iCloud Photos" |