Skip to content

Commit

Permalink
feat: add renaming script
Browse files Browse the repository at this point in the history
  • Loading branch information
gciatto committed Dec 23, 2022
1 parent 6ddc082 commit ed33dbc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions rename-template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!bash

NEW_NAME=$1

if [[ -z "$NEW_NAME" ]]; then
echo "Must provide a new name as argument" 1>&2
exit 1
fi

for FILE in `find . -type f -not -iname '*.pyc' -not -path '*.git*'`; do
sed -i'.bak' -e "s/my_project/$NEW_NAME/g" $FILE
done

for FILE in `find .github -type f -not -iname '*.pyc'`; do
sed -i'.bak' -e "s/my_project/$NEW_NAME/g" $FILE
done

rm .github/**/*.bak **/*.bak .*.bak *.bak *.sh

0 comments on commit ed33dbc

Please sign in to comment.