-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmorea-vanilla-install.sh
More file actions
executable file
·46 lines (34 loc) · 1.21 KB
/
morea-vanilla-install.sh
File metadata and controls
executable file
·46 lines (34 loc) · 1.21 KB
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
39
40
41
42
43
44
45
46
#!/bin/bash
if [ $# != 2 ]; then
echo "morea-vanilla-install <github account> <github repo>"
exit 1
fi
if [ -d "./master" ]; then
echo "master/ directory already exists. Exiting..."
exit 1
fi
if [ -d "./gh-pages" ]; then
echo "gh-pages/ directory already exists. Exiting..."
exit 1
fi
echo "Creating master/ directory with repo."
( set -x ; git clone git@github.com:$1/$2.git master)
echo ""
echo "Creating orphan branch, empty gh-pages/ directory."
( set -x ; git clone git@github.com:$1/$2.git gh-pages)
if [ -d "./gh-pages" ]; then
( set -x ; cd gh-pages; git checkout --orphan gh-pages; git rm -rf .; git branch -u origin/gh-pages )
else
echo "gh-pages directory not created. Exiting..."
exit 1
fi
echo ""
echo "master/ and gh-pages/ directories created."
echo "Adding a remote called 'core' connected to morea-framework/core (this can fail if already set)"
(set x; cd ./master; git remote add core https://github.com/morea-framework/core.git)
echo "Here are the current upstream repos:"
(set x; cd ./master; git remote -v)
echo "Fetching core"
( set -x ; cd ./master ; git fetch core)
echo "Merging core into master"
( set -x ; cd ./master ; git merge -m "merging core into master" core/master )