forked from MirakelX/mirakel-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_subtrees.sh
executable file
·46 lines (38 loc) · 1 KB
/
update_subtrees.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -e
source ./.subrepos
if [ -f ./.localconfig ]; then
source ./.localconfig
else
echo "Declare \$user variable in .localconfig first" >&2
exit 1
fi
export EDITOR=/bin/true
export GIT_EDITOR=/bin/true
export VISUAL=/bin/true
export EDITOR=/bin/true
git reset --hard HEAD
git checkout master
git pull
for repo in ${repos[@]} ; do
echo "Pulling $repo"
git subtree pull --prefix="$repo" "ssh://[email protected]:29418/mirakel-android/$repo" master
done
for repo in ${extra_repos[@]} ; do
echo "Pulling $repo"
git subtree pull --prefix="$repo" "ssh://[email protected]:29418/$repo" master
done
#cp buildfiles
cp build/build.gradle .
cp build/settings.gradle .
if [ -n "$(git status --porcelain)" ]; then
git add build.gradle settings.gradle;
git commit -m "Update buildfiles"
fi
cp new_ui/README.md .
if [ -n "$(git status --porcelain)" ]; then
git add README.md;
git commit -m "Update Readme"
fi
echo "Do not forget to push to github"
echo "git push --force"