There's a filename formatter that's being used already in various repositories, such as
the TypeScript repository repository, the C/C++ repositories, and soon other repositories as well.
This is not a Python script but more of a Bash script, I guess.
What do you think? Should we adjust it and add it to this repository? Thanks.
IFS=$'\n'
for fname in `find . -type f -name '*.cpp' -o -name '*.hpp'`
do
echo "${fname}"
new_fname=`echo ${fname} | tr ' ' '_'`
echo " ${new_fname}"
new_fname=`echo ${new_fname} | tr 'A-Z' 'a-z'`
echo " ${new_fname}"
new_fname=`echo ${new_fname} | tr '-' '_'`
echo " ${new_fname}"
if [ ${fname} != ${new_fname} ]
then
echo " ${fname} --> ${new_fname}"
git "mv" "${fname}" ${new_fname}
fi
done
CC: @raklaptudirm, @appgurueu, you might want to check this out as well.
Description
There's a filename formatter that's being used already in various repositories, such as the TypeScript repository repository, the C/C++ repositories, and soon other repositories as well.
This is not a Python script but more of a Bash script, I guess. What do you think? Should we adjust it and add it to this repository? Thanks.
CC: @raklaptudirm, @appgurueu, you might want to check this out as well.