-
Notifications
You must be signed in to change notification settings - Fork 39
/
sync_externals.csh
executable file
·29 lines (21 loc) · 1.76 KB
/
sync_externals.csh
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
#!/bin/tcsh
git remote add -f coda-oss_remote https://github.com/mdaus/coda-oss.git
git remote add -f nitro_remote https://github.com/mdaus/nitro.git
# To set this up the very first time
# This does a subtree merge and puts it in the externals/coda-oss directory. --squash avoids copying all the history
# You can replace 'master' with any branch of CODA-OSS you want
# git subtree add --prefix externals/coda-oss coda-oss_remote master --squash
# Same deal for NITRO
# git subtree add --prefix externals/nitro nitro_remote master --squash
# Then, let's get rid of some externals we don't care about
# git is smart, so we only have to do this once and then future subtree pulls will never
# pull these in
# git rm -r externals/coda-oss/modules/drivers/fftw externals/coda-oss/modules/drivers/openssl externals/coda-oss/modules/drivers/pcre externals/coda-oss/modules/drivers/sql externals/coda-oss/modules/drivers/uuid externals/coda-oss/modules/drivers/zlib externals/coda-oss/modules/drivers/jars externals/coda-oss/modules/drivers/jpeg externals/coda-oss/waf externals/coda-oss/wscript
# git rm -r externals/nitro/externals externals/nitro/projects externals/nitro/utils externals/nitro/waf externals/nitro/wscript
# Now we just want to update
# Here I'm assuming you're running this on the master branch... otherwise the push command should change
git subtree pull --prefix externals/coda-oss coda-oss_remote master --squash
git subtree pull --prefix externals/nitro nitro_remote master --squash
# If when you do this command you git a merge conflict because a file that has been removed here has been updated in CODA-OSS, you just need to do a 'git rm <pathname>' to resolve the merge conflict. Then a 'git commit'.
# TODO: Make this script smart enough to do this.
#git push origin master