Skip to content

Commit

Permalink
add: ファイルリネームスクリプトを追加 (#455)
Browse files Browse the repository at this point in the history
Co-authored-by: Naoki Aoyama <naaoyama@bbtower.co.jp>
  • Loading branch information
naa0yama and Naoki Aoyama committed May 22, 2024
1 parent 1546c73 commit d5e9d64
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 34 deletions.
34 changes: 0 additions & 34 deletions copy_template.sh

This file was deleted.

32 changes: 32 additions & 0 deletions rename_project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -eu

read -p "Renmae project name :" INPUT_PROJ
read -p "Renmae project description :" INPUT_DESC
echo "+-------------------------------------------------------+"
echo "Project name $INPUT_PROJ"
echo "Project description $INPUT_DESC"
echo "+-------------------------------------------------------+"
read -p " Conform ? (y/n): " CHECK_YN

case "$CHECK_YN" in
[yY])
set -x
sed -i'' -e "s/pythonboilerplate/${INPUT_PROJ}/g" pyproject.toml
sed -i'' -e "s/Python を開発する時用ボイラープレート/${INPUT_DESC}/g" pyproject.toml
sed -i'' -e "s/# pythonboilerplate/# ${INPUT_PROJ}/g" README.md
sed -i'' -e "s/pythonboilerplate/${INPUT_PROJ}/g" .vscode/settings.json
sed -i'' -e "s/pythonboilerplate/${INPUT_PROJ}/g" src/pythonboilerplate/__init__.py
sed -i'' -e "s/pythonboilerplate/${INPUT_PROJ}/g" tests/test_pythonboilerplate.py
mv src/pythonboilerplate src/${INPUT_PROJ}
mv tests/test_pythonboilerplate.py tests/test_${INPUT_PROJ}.py
set +x
echo "+-------------------------------------------------------+"
echo "Completed."
echo "+-------------------------------------------------------+"
exit 0
;;
[nN]) echo "canceled."
exit 1
;;
esac

0 comments on commit d5e9d64

Please sign in to comment.