1
0
Fork 0
Coding standards for all Yzena projects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
804 B

#! /bin/bash
echo -n "Name of new project: "
read capital
lower=$(echo "$capital" | tr '[:upper:]' '[:lower:]')
upper=$(echo "$capital" | tr '[:lower:]' '[:upper:]')
year=$(date +"%Y")
find . -type f -print0 | xargs -0 sed -i "s/%%%%%/$upper/g"
find . -type f -print0 | xargs -0 sed -i "s/%%%%/$capital/g"
find . -type f -print0 | xargs -0 sed -i "s/%%%/$lower/g"
find . -type f -print0 | xargs -0 sed -i "s/<year>/$year/g"
for f in $(find . -type f -name "*%%%%%*")
do
mv "$f" "`echo $f | sed s/%%%%%/$upper/g`"
done
for f in $(find . -type f -name "*%%%%*")
do
mv "$f" "`echo $f | sed s/%%%/$capital/g`"
done
for f in $(find . -type d -name "*%%%*")
do
mv "$f" "`echo $f | sed s/%%%/$lower/g`"
done
for f in $(find . -type f -name "*%%%*")
do
mv "$f" "`echo $f | sed s/%%%/$lower/g`"
done