Skip to content

Commit 819ce71

Browse files
author
Michael Cooper
committed
remove orphan branch and looping from technique script
1 parent f548525 commit 819ce71

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

create-techniques.sh

+10-21
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,13 @@
33
# $2 = filename
44
# $3 = type
55
# $4 = title
6-
cp techniques/technique-template.html ../technique-template.html
7-
while [ $# -gt 0 ]
8-
do
9-
git checkout --orphan tech-$2
10-
git rm -rf .
11-
mkdir techniques
12-
mkdir techniques/$1
13-
cp ../technique-template.html techniques/$1/$2.html
14-
sed -i "s|<p id=\"technology\"></p>|<p id=\"technology\">$1</p>|" techniques/$1/$2.html
15-
sed -i "s|<p id=\"type\"></p>|<p id=\"type\">$3</p>|" techniques/$1/$2.html
16-
sed -i "s|Technique Title|$4|g" techniques/$1/$2.html
17-
git add techniques/$1/$2.html
18-
git commit -m "Set up $2 technique"
19-
git push --set-upstream origin tech-$2
20-
shift
21-
shift
22-
shift
23-
shift
24-
done
25-
rm ../technique-template.html
26-
git checkout technique-setup
6+
git checkout -b tech-$2
7+
mkdir techniques/$1
8+
cp techniques/technique-template.html techniques/$1/$2.html
9+
sed -i "s|<p id=\"technology\"></p>|<p id=\"technology\">$1</p>|" techniques/$1/$2.html
10+
sed -i "s|<p id=\"type\"></p>|<p id=\"type\">$3</p>|" techniques/$1/$2.html
11+
sed -i "s|Technique Title|$4|g" techniques/$1/$2.html
12+
git add techniques/$1/$2.html
13+
git commit -m "Set up $2 technique"
14+
git push --set-upstream origin tech-$2
15+
git checkout master

0 commit comments

Comments
 (0)