4
Archive a daily build of the trunk.
10
from targz import make_tgz
12
dest = "/home/james/bkrpr.org/download"
15
if not os.path.exists(dest):
17
link = dest + '/' + link
19
def try_daily(dest, n=3):
21
today = datetime.date.today()
22
tgz = dest + '/bkrpr-' + str(today) + '.tgz'
23
revision = make_tgz(tgz)
29
return try_daily(dest, n-1)
31
def update_link(link, dest):
32
'''Point link at dest, delete what it used to point at.'''
34
curr_dest = os.readlink(link)
39
os.symlink(dest, link)
42
tgz, revision = try_daily(dest, 3)
43
update_link(link, tgz)
45
if __name__ == '__main__':
50
tb = traceback.format_exc()
52
sendMail('bkrpr@noreply.net','james@hackervisions.org','Bkrpr daily package failed',tb)