cleanname structure fixes

master
TiynGER 5 years ago
parent 289a1c29be
commit cafcd98fa0

@ -8,13 +8,13 @@ do
echo "skipping $newname, because it already exists" echo "skipping $newname, because it already exists"
rm "$oldname"; rm "$oldname";
else else
echo "renaming file $oldname to $newname" echo "renaming file $oldname to $newname"
if [ -f "$oldname" ]; then if [ -f "$oldname" ]; then
mv "$oldname" "$newname"; mv "$oldname" "$newname";
elif [ -d "$oldname" ]; then elif [ -d "$oldname" ]; then
cp -r "$oldname/." "$newname" && rm -r "$oldname"; cp -r "$oldname/." "$newname" && rm -r "$oldname";
else else
mv "$oldname" "$newname" mv "$oldname" "$newname";
fi fi
fi fi
fi fi

Loading…
Cancel
Save