From 57448259139628bf8c168f7d4dad77b6874978cb Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 18 Sep 2024 23:59:42 +0900 Subject: updated --- copy.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/copy.sh b/copy.sh index c2b860ee..5c53cf62 100755 --- a/copy.sh +++ b/copy.sh @@ -333,8 +333,15 @@ printf "\n" # Copy Config Files # set -e # Exit immediately if a command exits with a non-zero status. -printf "${NOTE} - copying dotfiles first part\n" +# Function to create a unique backup directory name with month, day, hours, and minutes +get_backup_dirname() { + local timestamp + timestamp=$(date +"%m%d_%H%M") + echo "back-up_${timestamp}" +} + +printf "${NOTE} - copying dotfiles first part\n" # Config directories which will ask the user whether to replace or not DIRS=" ags @@ -398,13 +405,6 @@ printf "\n%.0s" {1..1} printf "${NOTE} - Copying dotfiles second part\n" -# Function to create a unique backup directory name with month, day, hours, and minutes -get_backup_dirname() { - local timestamp - timestamp=$(date +"%m%d_%H%M") - echo "back-up_${timestamp}" -} - # Check if the config directory exists if [ ! -d "config" ]; then echo "${ERROR} - The 'config' directory does not exist." -- cgit v1.2.3