CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/scripts/export_public_version.py
Views: 687
1
#!/usr/bin/env python
2
3
import os
4
5
6
def cmd(s):
7
print s
8
if os.system(s):
9
raise RuntimeError("error running '%s'" % s)
10
11
12
if __name__ == '__main__':
13
os.chdir("%s/tmp" % os.environ['HOME'])
14
cmd("rm -rf cloud-public cloud-private")
15
cmd("git clone [email protected]:sagemathinc/smc-public.git cloud-public && rm -rf cloud-public/*"
16
)
17
cmd("git clone ~/salvus cloud-private")
18
cmd("rsync -axvH cloud-private/salvus/ cloud-public/")
19
cmd("cp -v cloud-private/*.md cloud-public/")
20
cmd("cd cloud-public && git add --all .")
21
print "See %s/tmp/cloud-public" % os.environ['HOME']
22
print "NOW do this:"
23
print "git commit -a -v"
24
print "git push"
25
print "git push [email protected]:sagemath/cloud.git"
26
#cmd("rm -rf cloud-private")
27
28