config-backup (757B)
1 #!/bin/sh 2 3 # Copy my config files to my backup folder 4 5 folder=$HOME/box/configbackups 6 7 dotfiles=".bash_profile .bashrc .profile .inputrc .mblaze .nexrc .tmux.conf .xinitrc" 8 config="colors fontconfig git imv msmtp zathura" 9 src="dmenu dwm st" 10 11 for d in config home src ssh; do mkdir -p "$folder/$d"; done 12 13 # copy 14 15 for i in $dotfiles; 16 do cp -Rf "$HOME"/"$i" "$folder"/home/ 17 done 18 19 for i in $config 20 do cp -Rf "$HOME"/.config/"$i" "$folder"/config/ 21 done 22 23 for i in $src 24 do mkdir "$folder"/src/"$i" 25 cp -f "$HOME"/.local/src/"$i"/*.{c,h} "$folder"/src/"$i"/ 26 done 27 28 cp "$HOME"/.ssh/config "$folder"/ssh/ 29 30 # redact 31 32 sed 's/^password .*/password REDACTED/' \ 33 < "$folder"/config/msmtp/config > "$folder"/config/msmtp/config.redacted 34 rm "$folder"/config/msmtp/config