File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
read -p ' Project Name: ' projectvar
4
4
5
- grep -rli ' NEW_NAME' scripts/rename-base.sh | xargs -I@ sed -i ' ' " s/NEW_NAME/$projectvar /g" @
5
+ if [[ " $projectvar " =~ [a-zA-Z_][a-zA-Z_0-9]* $ ]]; then
6
+ grep -rli ' NEW_NAME' scripts/rename-base.sh | xargs -I@ sed -i ' ' " s/NEW_NAME/$projectvar /g" @
7
+
8
+ sh ./scripts/rename-base.sh
9
+
10
+ swish appicon
11
+ swish xcodeproj
12
+
13
+ rm -rf scripts
14
+ rm rename.sh
15
+ else
16
+ echo ' Invalid Project Name'
17
+ echo ' '
18
+ echo ' The project name should only include the following characters:'
19
+ echo ' - alphanumerics'
20
+ echo ' - "_"'
21
+ echo ' '
22
+ echo ' The project name should not start with a number.'
23
+ fi
6
24
7
- sh ./scripts/rename-base.sh
8
25
9
- swish appicon
10
- swish xcodeproj
11
-
12
- rm -rf scripts
13
- rm rename.sh
You can’t perform that action at this time.
0 commit comments