aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/scripts/backup/backup-flash
blob: 051b6d6ebf8b6c1ea23e81420e162c49c8e4081a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
cd ~

fsync () {
    rsync -RUuavn --delete-after $exclude $syncfile "$target"
    printf "===commit these changes?\n"
    read -p "y/n: " uinput
    if [ "$uinput" != "n" ] && [ "$uinput" != "N" ]; then
        printf "\n\n\n"
        rsync -RUuav --progress --delete-after $exclude $syncfile "$target"
        printf "\n===end sync\n---------\n\n"
    fi
}

syncfile="stuff/scripts"
target="/mnts/flash/backup"
exclude="--exclude target/* --exclude node_modules/* --exclude thumbnails/* --exclude 4dm/* --exclude /nwjs.*"

fsync