40 lines
668 B
Bash
40 lines
668 B
Bash
|
#!/usr/bin/env zsh
|
||
|
|
||
|
BAK="/home/dym/Servers/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
|
||
|
)
|
||
|
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}_bak"
|
||
|
done
|
||
|
|
||
|
echo "-
|
||
|
-
|
||
|
# '~/.privat'"
|
||
|
sudo \
|
||
|
rsync -zrhP --links --size-only --verbose --delete \
|
||
|
"/home/dym/.privat/" \
|
||
|
"$BAK/.privat_bak"
|