_dump/bak-current.sh

42 lines
667 B
Bash
Raw Normal View History

#!/usr/bin/env zsh
BAK="/mnt/self-files"
if [ ! -z "$1" ]; then
BAK="$1"
fi
cd `realpath "$0" | xargs dirname`
./bak-home.sh "$BAK/Home_bak"
cp /home/dym/.config/doublecmd/doublecmd.xml \
/Cfg/doublecmd/
DIRS=(
_
Apps
Cfg
home/dym/.privat
)
for DIR in "${DIRS[@]}"; do
echo "-
-
# '$DIR'"
sudo \
rsync -zrhP --links --size-only --verbose --delete \
--exclude '**/.Trash-1000' \
--exclude '**/__sapper__/' \
--exclude '**/node_modules/' \
--exclude '**/target/' \
"/$DIR/" \
"$BAK/${DIR}"
done
echo "-
-
# '.privat'"
sudo \
rsync -zrhP --links --size-only --verbose --delete \
"/home/dym/.privat/" \
"$BAK/.privat"