aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin/scripts/backup/pull-froml
blob: 63d1f0541c00192d67f614db8fccf2f3c469595e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
cd ~/

fsynca () {
    # t?
    rsync -RUuavn $exclude $syncfile "$target"
}

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

#   !! no in use. backup script does not perserve timestamps or something so it wants to overwrite most files
#   will fix bidirectional sync at some point
# syncfile="laptop:.surf/styles laptop:.urlview laptop:.gnupg laptop:.local/bin/lf-gadgets laptop:.local/share/applications/custom laptop:.config/FreeTube laptop:.config/newsboat laptop:.config/zsh laptop:.config/vesktop/themes laptop:.config/Pinta laptop:.config/cmus laptop:.config/gajim/theme laptop:stuff"
syncfile="laptop:stuff/scripts/node/Nwjs/nms-data/"

#sync game stuff
target="/home/iceyrazor/"
exclude="--exclude stuff/.private --exclude stream.sh --exclude node_modules --exclude **/target"


fsynca

fsyncb