2023-12-03 16:50:14 +00:00
|
|
|
#!/bin/bash
|
2023-11-22 11:01:41 +00:00
|
|
|
# Execute the script with ./sync version e.g., ./sync 2.5.2
|
|
|
|
|
|
|
|
if [ ! -z $1 ] ;then
|
|
|
|
if [ -d ~/dotfiles-versions/"$1" ] ;then
|
|
|
|
echo "Folder exists. Start rsync now ..."
|
2023-11-24 12:19:48 +00:00
|
|
|
rsync -avzh -I --exclude-from=excludes.txt ~/dotfiles-versions/$1/ ~/dotfiles
|
2023-11-22 11:01:41 +00:00
|
|
|
else
|
|
|
|
echo "Folder ~/dotfiles-versions/$1 not found."
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "No folder specified. Please use ./sync folder"
|
|
|
|
fi
|