-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmakeRelease
executable file
·58 lines (44 loc) · 1.8 KB
/
makeRelease
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
#!/usr/bin/python
#
# make the release of one of the benchmarks
# -- cleans the directories
# -- does a test compile
# -- copies all links into the directories
# -- removes svn info
# -- creates tar file and copies .html file to /tmp/pbbs/
import os
import sys
dirname = sys.argv[1]
if(dirname.endswith("/")):
dirname = dirname[:-1]
copyFiles = ["README"]
targetName = "/tmp/" + dirname
print("Removing old directory from /tmp")
os.system("rm -fr " + targetName)
print("Cleaning, Copying all files into directories, and Trial Make")
os.system("mkdir " + targetName);
for file in copyFiles :
os.system("cp -L " + dirname + "/" + file + " " + targetName);
releaseDirs = (open(dirname + "/release").read()).split('\n')
for implementation in releaseDirs[0:len(releaseDirs)-1] :
imp = dirname + "/" + implementation
print("making: " + imp)
os.system("cd " + imp + "; make; make clean")
os.system("cd " + dirname + "/common; make clean")
if(os.path.exists(dirname + "/getdata")):
os.system("cd " + dirname + "; ./getdata")
for implementation in releaseDirs[0:len(releaseDirs)-1] :
imp = dirname + "/" + implementation
os.system("cp -rL " + imp + " " + targetName);
os.system("cp -rL " + dirname + "/common " + targetName);
print("Removing all .svn directories")
os.system("rm -fr /tmp/" + dirname + "/*/.svn");
os.system("rm -fr /tmp/" + dirname + "/*/*/.svn");
if(not os.path.exists("/tmp/pbbs")):
print("Creating /tmp/pbbs directory");
os.system("mkdir /tmp/pbbs");
os.system("cp -L " + dirname + "/" + dirname + ".html " + targetName);
os.system("cp -L " + dirname + "/" + dirname + ".html " + "/tmp/pbbs");
os.system("cp /tmp/" + dirname + "/" + dirname + ".html /tmp/pbbs/.");
print("Taring the result")
os.system("cd /tmp/; tar -chf pbbs/" + dirname + ".tar " + dirname)