-
Notifications
You must be signed in to change notification settings - Fork 5
/
archive.pl
executable file
·51 lines (42 loc) · 1.58 KB
/
archive.pl
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
#!/usr/bin/perl
#archive.pl
# Generates zip archive of WholeCellKB code
#
#Author: Jonathan Karr, [email protected]
#Affiliation: Covert Lab, Department of Bioengineering, Stanford University
#Last updated: 2012-08-10
$url=trim(`svn info | grep URL | cut -f2 -d" "`);
#clean previous archive
`rm -rf WholeCellKB-*.zip`;
#archive code
`svn export $url WholeCellKB`;
`rm -rf WholeCellKB/public/fixtures/`;
`rm -rf WholeCellKB/.htaccess`;
`rm -rf WholeCellKB/archive.pl`;
`rm -rf WholeCellKB/DevelopersGuide.tex`;
`export PYTHONPATH=$PYTHONPATH:.`;
`export DJANGO_SETTINGS_MODULE=settings`;
`rm -rf static/public/doc`;
`svn up static/public/doc`;
`epydoc -o static/public/doc --name=WholeCellKB --url=http://wholecellkb.stanford.edu --html --graph all --parse-only --docformat plaintext public`;
`cp -R static/public/doc WholeCellKB/static/public/`;
`python2.7 manage.py graph_models public | dot -Tsvg -o static/public/img/data_model.svg`;
`python2.7 manage.py graph_models public | dot -Tpng -o static/public/img/data_model.png`;
`cp static/public/img/data_model.* WholeCellKB/static/public/img/`;
`zip WholeCellKB-code.zip -r WholeCellKB`;
`rm -rf WholeCellKB`;
#archive data
`mkdir WholeCellKB`;
`svn export $url/public/fixtures/data.fna WholeCellKB/data.fna`;
`svn export $url/public/fixtures/data.sql WholeCellKB/data.sql`;
`svn export $url/public/fixtures/data.xlsx WholeCellKB/data.xlsx`;
`svn export $url/README.txt WholeCellKB/README.txt`;
`zip WholeCellKB-data.zip -r WholeCellKB`;
`rm -rf WholeCellKB`;
sub trim($)
{
my $string = shift;
$string =~ s/^\s+//;
$string =~ s/\s+$//;
return $string;
}