adding new files

This commit is contained in:
2025-06-20 21:46:44 +02:00
parent 46a517d1f3
commit a7c0018684
21 changed files with 960 additions and 0 deletions

21
config-backup.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Set the paths for the source and destination directories
SRC="/home/belar/.config"
DST_DIR=/mnt/nas_belar/rsync/config-backup/
# Sync the source directory to the destination directory
/usr/bin/rsync -CERrltm --delete "${SRC}" "${DST_DIR}"
# Change to the Git repository directory
cd $DST_DIR
# Commit the changes with the current date as the commit message
git add .
git commit -m "$(date +%Y-%m-%d-%H-%M)"
# Push the changes to the remote repository if one is configured
if [ "$(git remote)" ]; then
git push
fi