forked from Azure/azure-storage-fuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
subtree.sh
executable file
·35 lines (31 loc) · 1004 Bytes
/
subtree.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
echo "Performing $1 operation"
echo "--------------------------------"
echo
if [ $1 = "pull" ]
then
git subtree pull --prefix cpplite https://github.com/Azure/azure-storage-cpplite master --squash
elif [ $1 = "push" ]
then
git subtree push --prefix cpplite https://github.com/Azure/azure-storage-cpplite master --squash
elif [ $1 = "add" ]
then
git subtree add --prefix cpplite https://github.com/Azure/azure-storage-cpplite master --squash
elif [ $1 = "remove" ]
then
git rm -f cpplite
elif [ $1 == "list" ]
then
echo "List of sbutree directories : "
git log | grep git-subtree-dir | awk '{ print $2 }'
elif [ $1 == "diff" ]
then
echo "Diff between local subtree and remote master : "
git diff azure-storage-cpplite/master master:cpplite
elif [ $1 == "remote-tree" ]
then
echo "Adding remote git for subtree : "
git remote add -f azure-storage-cpplite https://github.com/Azure/azure-storage-cpplite
else
echo "Options : pull push add remove list diff remote-tree"
fi
echo