# -*- Mode: Python; tab-width: 4 -*-

import os
import time
import string
import sys

# for now, just build a date string into the name.

if len(sys.argv) > 1:
	package = sys.argv[1]
else:
	package = 'medusa-src'

date_string = time.strftime ('%Y%m%d', time.gmtime(time.time ()))

if os.path.isfile ('/tmp/%s.tar.gz' % package):
	oname = '/tmp/%s.tar.gz' % package
	nname = '/tmp/%s-%s.tar.gz' % (package, date_string)
	os.rename (oname, nname)
	print '-'*80
	print nname
else:
    print 'No such file: /tmp/%s.tar.gz' % package
