mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2024-11-27 16:10:55 +01:00
16 lines
317 B
Bash
Executable File
16 lines
317 B
Bash
Executable File
#!/bin/env bash
|
|
|
|
if [ ! "$1" ]; then
|
|
echo "Usage: $0 <directory>"
|
|
exit 1
|
|
fi
|
|
|
|
for SRC in `find $1 -depth`
|
|
do
|
|
DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'`
|
|
if [ "${SRC}" != "${DST}" ]
|
|
then
|
|
[ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" || echo "${SRC} was not renamed"
|
|
fi
|
|
done
|