From 902432d674b3e8d4e564f94669cf536cbc6984bd Mon Sep 17 00:00:00 2001 From: TiynGER Date: Fri, 21 Feb 2020 12:12:29 +0100 Subject: [PATCH] cleanname does correct for each file --- .local/bin/etc/cleanname | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.local/bin/etc/cleanname b/.local/bin/etc/cleanname index d19c5f0..440dcac 100755 --- a/.local/bin/etc/cleanname +++ b/.local/bin/etc/cleanname @@ -11,11 +11,10 @@ do if [ -f "$oldname" ]; then echo "renaming file $oldname to $newname" cp "$oldname" "$newname" && rm "$oldname"; - else + elif [ -d "$oldname" ]; then echo "renaming directory $oldname to $newname" cp -r "$oldname/." "$newname" && rm -r "$oldname"; fi fi - fi done