forked from Loki-Astari/JsonBenchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetUpNewProject
More file actions
executable file
·40 lines (27 loc) · 892 Bytes
/
setUpNewProject
File metadata and controls
executable file
·40 lines (27 loc) · 892 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
github=$1
name=${github##*/}
name=${name%.git}
name=${name/-/}
name=${name/#/}
echo "From: ${github}"
echo "Name: ${name}"
echo "Good?"
read alternativeName
if [[ ${alternativeName} != "" ]]; then
name=${alternativeName}
fi
branch="Add${name}"
get checkout NewProject
git branch ${branch}
git push origin ${branch}
git branch -d ${branch}
git checkout ${branch}
git submodule add ${github} thirdparty/${name}
git mv init/NewProject init/${name}
git mv src/ThirdParty/NewProjectTest.cpp src/ThirdParty/${name}Test.cpp
sed -i '' -e "s/NewProject/${name}/" src/ThirdParty/${name}Test.cpp
sed -i '' -e "s/NewProject/${name}/" src/ThirdParty/Makefile
sed -i '' -e "s/NewProject/${name}/" src/ThirdParty/test.cpp
sed -i '' -e "s/NewProject/${name}/" runOneTest
git add src/ThirdParty/${name}Test.cpp src/ThirdParty/Makefile src/ThirdParty/test.cpp runOneTest