scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit 85abd963873a168d7c163d4efb607bbb8fb3450f
parent 8d95f6eea1b2cc4dd6d900d9d6ca9da324cbdf22
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Fri, 10 May 2024 14:59:23 +0200

Improved backup script

Diffstat:
Mconfig-backup | 17+++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/config-backup b/config-backup @@ -6,15 +6,24 @@ folder=$HOME/box/configbackups dotfiles=".bash_profile .bashrc .profile .inputrc .mblaze .nexrc .tmux.conf .xinitrc" config="colors fontconfig git imv msmtp zathura" -src="dmenu dwm st st-lightbg" +src="dmenu dwm st" for d in config home src ssh; do mkdir -p "$folder/$d"; done # copy -for i in $dotfiles; do cp -Rf "$HOME"/"$i" "$folder"/home/; done -for i in $config; do cp -Rf "$HOME"/.config/"$i" "$folder"/config/; done -for i in $src; do cp -Rf "$HOME"/.local/src/"$i" "$folder"/src/; done +for i in $dotfiles; + do cp -Rf "$HOME"/"$i" "$folder"/home/ +done + +for i in $config + do cp -Rf "$HOME"/.config/"$i" "$folder"/config/ +done + +for i in $src + do mkdir "$folder"/src/"$i" + cp -f "$HOME"/.local/src/"$i"/*.{c,h} "$folder"/src/"$i"/ +done cp "$HOME"/.ssh/config "$folder"/ssh/