Add time to backup directory name.
dblume

dblume commited on 2022-08-06 23:05:24
Showing 1 changed files, with 1 additions and 1 deletions.

... ...
@@ -2,7 +2,7 @@
2 2
 set -eu -o pipefail # See: https://sipb.mit.edu/doc/safe-shell/
3 3
 
4 4
 declare -r SCRIPT_NAME=$(basename "$BASH_SOURCE")
5
-declare -r backup_dir=$HOME/backup_of_dotfiles_`date "+%Y-%m-%d"`
5
+declare -r backup_dir=$HOME/backup_of_dotfiles_$(date "+%Y-%m-%d_%H%M%S")
6 6
 declare -a dotfiles=(".bashrc" ".bash_profile" ".vimrc" ".editrc" ".gitconfig"
7 7
                      ".gitignore" ".inputrc" ".tmux.conf" ".ssh/config" ".ripgreprc"
8 8
                      ".gdbinit")
9 9