Last active
January 28, 2022 19:20
-
-
Save ThomasDalla/9fd6041d546d6898fac6ce87836f588d to your computer and use it in GitHub Desktop.
Upload all 7z files (split with 7z-folder) for the given folder to 1and1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo "Need to pass the year to process" | |
| else | |
| YEAR=$1 | |
| echo "Processing year $YEAR" | |
| for f in $(ls $YEAR.7z.*) | |
| do | |
| echo "Uploading $f" | |
| rclone --config ~/.config/rclone/rclone.conf copy --progress $f 1and1:/Pictures/ | |
| done | |
| echo "Done! Checking md5..." | |
| 1and1 "cd Pictures && md5sum -c $YEAR.7z.md5" | |
| fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment