-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreplace.sh
executable file
·25 lines (22 loc) · 977 Bytes
/
replace.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
read -p "Name of project? [Recommended: use lowercase, and if it is many words, use kebab-case] : " new_proj_name
# author name
read -p "GitHub username? [Default: dannypsnl] : " username
if [ -z $username ]; then
echo "keep origin github id"
else
sed -i "" "s/dannypsnl/$username/g" ./info.rkt
sed -i "" "s/dannypsnl/$username/g" ./README.md
fi
read -p "your only name? [Default: Lîm Tsú-thuàn] : " yourname
if [ -z $yourname ]; then
echo "keep origin author name"
else
sed -i "" "s/Lîm Tsú-thuàn/$yourname/g" ./scribblings/racket-project.scrbl
sed -i "" "s/Lîm Tsú-thuàn/$yourname/g" ./LICENSE-MIT
fi
# repo name
sed -i "" "s/racket-project/$new_proj_name/g" ./info.rkt
sed -i "" "s/racket-project/$new_proj_name/g" ./main.rkt
sed -i "" "s/racket-project/$new_proj_name/g" ./scribblings/racket-project.scrbl
sed -i "" "s/racket-project/$new_proj_name/g" ./README.md
mv ./scribblings/racket-project.scrbl ./scribblings/$new_proj_name.scrbl