Skip to content

Commit

Permalink
2023.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jumping2000 committed Oct 15, 2023
1 parent 6d19f18 commit 98d8405
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions smart_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 98d8405

Please sign in to comment.