From 98d8405d85ef8bdece79a7f7bd872643f658c2a6 Mon Sep 17 00:00:00 2001 From: jumping2000 Date: Mon, 16 Oct 2023 00:14:22 +0200 Subject: [PATCH] 2023.10.2 --- smart_config.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/smart_config.sh b/smart_config.sh index b7868b4..4aabdb7 100644 --- a/smart_config.sh +++ b/smart_config.sh @@ -65,8 +65,6 @@ function replace_string() { function rename_files() { local appliance="$1" local dir="$2" - info "$appliance" - info "$dir" # Loop through files in the directory and copy if search_string is found for file in "$dir"/*; do if [ -f "$file" ]; then @@ -75,8 +73,8 @@ function rename_files() { cp "$file" "$dir/keys.txt" info "Copied '$filename' to 'keys.txt'" elif [[ "$filename" != *keys* ]] && [[ "$filename" != *"$appliance"* ]]; then - cp "$file" "$dir/$filename.txt" - info "Copied '$file' to '$filename.txt'" + mv "$file" "$dir/$filename.txt" + info "Rename '$file' to '$filename.txt'" fi fi