forked from orfin/WellCommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitsync.sh
executable file
·159 lines (152 loc) · 16.8 KB
/
gitsync.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/usr/bin/env bash
action=$1
if [ "$action" == 'init' ]
then
rm -rf src/WellCommerce/Bundle/*
rm -rf src/WellCommerce/Component/*
rm -rf web/themes/wellcommerce-default-theme
git commit -a -m "Reinitializing subtrees"
git subtree add --prefix=src/WellCommerce/Component/Collections [email protected]:WellCommerce/Collections.git master
git subtree add --prefix=src/WellCommerce/Component/DataSet [email protected]:WellCommerce/DataSet.git master
git subtree add --prefix=src/WellCommerce/Component/DataGrid [email protected]:WellCommerce/DataGrid.git master
git subtree add --prefix=src/WellCommerce/Component/Form [email protected]:WellCommerce/Form.git master
git subtree add --prefix=src/WellCommerce/Bundle/AdminBundle [email protected]:WellCommerce/AdminBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ApiBundle [email protected]:WellCommerce/ApiBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/AppBundle [email protected]:WellCommerce/AppBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/AttributeBundle [email protected]:WellCommerce/AttributeBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/AvailabilityBundle [email protected]:WellCommerce/AvailabilityBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/CompanyBundle [email protected]:WellCommerce/CompanyBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/CategoryBundle [email protected]:WellCommerce/CategoryBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/CartBundle [email protected]:WellCommerce/CartBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ClientBundle [email protected]:WellCommerce/ClientBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ContactBundle [email protected]:WellCommerce/ContactBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/CoreBundle [email protected]:WellCommerce/CoreBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/CountryBundle [email protected]:WellCommerce/CountryBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/CouponBundle [email protected]:WellCommerce/CouponBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/CurrencyBundle [email protected]:WellCommerce/CurrencyBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/DelivererBundle [email protected]:WellCommerce/DelivererBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/DictionaryBundle [email protected]:WellCommerce/DictionaryBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/DistributionBundle [email protected]:WellCommerce/DistributionBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/DoctrineBundle [email protected]:WellCommerce/DoctrineBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/LayeredNavigationBundle [email protected]:WellCommerce/LayeredNavigationBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/LayoutBundle [email protected]:WellCommerce/LayoutBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/LocaleBundle [email protected]:WellCommerce/LocaleBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/MediaBundle [email protected]:WellCommerce/MediaBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/NewsBundle [email protected]:WellCommerce/NewsBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/PageBundle [email protected]:WellCommerce/PageBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/OAuthBundle [email protected]:WellCommerce/OAuthBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/OrderBundle [email protected]:WellCommerce/OrderBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/PaymentBundle [email protected]:WellCommerce/PaymentBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ProductBundle [email protected]:WellCommerce/ProductBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ProductStatusBundle [email protected]:WellCommerce/ProductStatusBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ProducerBundle [email protected]:WellCommerce/ProducerBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ReportBundle [email protected]:WellCommerce/ReportBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ReviewBundle [email protected]:WellCommerce/ReviewBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/RoutingBundle [email protected]:WellCommerce/RoutingBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/SearchBundle [email protected]:WellCommerce/SearchBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ShippingBundle [email protected]:WellCommerce/ShippingBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ShopBundle [email protected]:WellCommerce/ShopBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/TaxBundle [email protected]:WellCommerce/TaxBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/ThemeBundle [email protected]:WellCommerce/ThemeBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/UnitBundle [email protected]:WellCommerce/UnitBundle.git master
git subtree add --prefix=src/WellCommerce/Bundle/WishlistBundle [email protected]:WellCommerce/WishlistBundle.git master
git subtree add --prefix=web/themes/wellcommerce-default-theme [email protected]:WellCommerce/wellcommerce-default-theme.git master
fi
if [ "$action" == 'push' ]
then
git commit -a -m "Pushing changes before synchronizing subtrees"
git subtree push --prefix=src/WellCommerce/Component/Collections [email protected]:WellCommerce/Collections.git master
git subtree push --prefix=src/WellCommerce/Component/DataSet [email protected]:WellCommerce/DataSet.git master
git subtree push --prefix=src/WellCommerce/Component/DataGrid [email protected]:WellCommerce/DataGrid.git master
git subtree push --prefix=src/WellCommerce/Component/Form [email protected]:WellCommerce/Form.git master
git subtree push --prefix=src/WellCommerce/Bundle/AdminBundle [email protected]:WellCommerce/AdminBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ApiBundle [email protected]:WellCommerce/ApiBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/AppBundle [email protected]:WellCommerce/AppBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/AttributeBundle [email protected]:WellCommerce/AttributeBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/AvailabilityBundle [email protected]:WellCommerce/AvailabilityBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/CompanyBundle [email protected]:WellCommerce/CompanyBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/CategoryBundle [email protected]:WellCommerce/CategoryBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/CartBundle [email protected]:WellCommerce/CartBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ClientBundle [email protected]:WellCommerce/ClientBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ContactBundle [email protected]:WellCommerce/ContactBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/CoreBundle [email protected]:WellCommerce/CoreBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/CountryBundle [email protected]:WellCommerce/CountryBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/CouponBundle [email protected]:WellCommerce/CouponBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/CurrencyBundle [email protected]:WellCommerce/CurrencyBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/DelivererBundle [email protected]:WellCommerce/DelivererBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/DictionaryBundle [email protected]:WellCommerce/DictionaryBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/DistributionBundle [email protected]:WellCommerce/DistributionBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/DoctrineBundle [email protected]:WellCommerce/DoctrineBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/LayeredNavigationBundle [email protected]:WellCommerce/LayeredNavigationBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/LayoutBundle [email protected]:WellCommerce/LayoutBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/LocaleBundle [email protected]:WellCommerce/LocaleBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/MediaBundle [email protected]:WellCommerce/MediaBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/NewsBundle [email protected]:WellCommerce/NewsBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/PageBundle [email protected]:WellCommerce/PageBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/OAuthBundle [email protected]:WellCommerce/OAuthBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/OrderBundle [email protected]:WellCommerce/OrderBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/PaymentBundle [email protected]:WellCommerce/PaymentBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ProductBundle [email protected]:WellCommerce/ProductBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ProductStatusBundle [email protected]:WellCommerce/ProductStatusBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ProducerBundle [email protected]:WellCommerce/ProducerBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ReportBundle [email protected]:WellCommerce/ReportBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ReviewBundle [email protected]:WellCommerce/ReviewBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/RoutingBundle [email protected]:WellCommerce/RoutingBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/SearchBundle [email protected]:WellCommerce/SearchBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ShippingBundle [email protected]:WellCommerce/ShippingBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ShopBundle [email protected]:WellCommerce/ShopBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/TaxBundle [email protected]:WellCommerce/TaxBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/ThemeBundle [email protected]:WellCommerce/ThemeBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/UnitBundle [email protected]:WellCommerce/UnitBundle.git master
git subtree push --prefix=src/WellCommerce/Bundle/WishlistBundle [email protected]:WellCommerce/WishlistBundle.git master
git subtree push --prefix=web/themes/wellcommerce-default-theme [email protected]:WellCommerce/wellcommerce-default-theme.git master
fi
if [ "$action" == 'pull' ]
then
git commit -a -m "Pushing changes before synchronizing subtrees"
git subtree pull --prefix=src/WellCommerce/Component/Collections [email protected]:WellCommerce/Collections.git master
git subtree pull --prefix=src/WellCommerce/Component/DataSet [email protected]:WellCommerce/DataSet.git master
git subtree pull --prefix=src/WellCommerce/Component/DataGrid [email protected]:WellCommerce/DataGrid.git master
git subtree pull --prefix=src/WellCommerce/Component/Form [email protected]:WellCommerce/Form.git master
git subtree pull --prefix=src/WellCommerce/Bundle/AdminBundle [email protected]:WellCommerce/AdminBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ApiBundle [email protected]:WellCommerce/ApiBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/AppBundle [email protected]:WellCommerce/AppBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/AttributeBundle [email protected]:WellCommerce/AttributeBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/AvailabilityBundle [email protected]:WellCommerce/AvailabilityBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/CompanyBundle [email protected]:WellCommerce/CompanyBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/CategoryBundle [email protected]:WellCommerce/CategoryBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/CartBundle [email protected]:WellCommerce/CartBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ClientBundle [email protected]:WellCommerce/ClientBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ContactBundle [email protected]:WellCommerce/ContactBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/CoreBundle [email protected]:WellCommerce/CoreBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/CountryBundle [email protected]:WellCommerce/CountryBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/CouponBundle [email protected]:WellCommerce/CouponBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/CurrencyBundle [email protected]:WellCommerce/CurrencyBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/DelivererBundle [email protected]:WellCommerce/DelivererBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/DictionaryBundle [email protected]:WellCommerce/DictionaryBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/DistributionBundle [email protected]:WellCommerce/DistributionBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/DoctrineBundle [email protected]:WellCommerce/DoctrineBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/LayeredNavigationBundle [email protected]:WellCommerce/LayeredNavigationBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/LayoutBundle [email protected]:WellCommerce/LayoutBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/LocaleBundle [email protected]:WellCommerce/LocaleBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/MediaBundle [email protected]:WellCommerce/MediaBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/NewsBundle [email protected]:WellCommerce/NewsBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/PageBundle [email protected]:WellCommerce/PageBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/OAuthBundle [email protected]:WellCommerce/OAuthBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/OrderBundle [email protected]:WellCommerce/OrderBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/PaymentBundle [email protected]:WellCommerce/PaymentBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ProductBundle [email protected]:WellCommerce/ProductBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ProductStatusBundle [email protected]:WellCommerce/ProductStatusBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ProducerBundle [email protected]:WellCommerce/ProducerBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ReportBundle [email protected]:WellCommerce/ReportBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ReviewBundle [email protected]:WellCommerce/ReviewBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/RoutingBundle [email protected]:WellCommerce/RoutingBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/SearchBundle [email protected]:WellCommerce/SearchBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ShippingBundle [email protected]:WellCommerce/ShippingBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ShopBundle [email protected]:WellCommerce/ShopBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/TaxBundle [email protected]:WellCommerce/TaxBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/ThemeBundle [email protected]:WellCommerce/ThemeBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/UnitBundle [email protected]:WellCommerce/UnitBundle.git master
git subtree pull --prefix=src/WellCommerce/Bundle/WishlistBundle [email protected]:WellCommerce/WishlistBundle.git master
git subtree pull --prefix=web/themes/wellcommerce-default-theme [email protected]:WellCommerce/wellcommerce-default-theme.git master
fi