Added the screenshots for the Sansa Clip Zip manual.
[maemo-rb.git] / utils / common / tarball.py
blob2e3277670280fa841e87387fdb42a77e246a8b04
1 #!/usr/bin/python
3 import gitscraper
4 import os
5 import sys
7 if len(sys.argv) < 2:
8 print("Usage: %s <version|hash>" % sys.argv[0])
9 sys.exit()
11 repository = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")
12 if '.' in sys.argv[1]:
13 version = sys.argv[1]
14 basename = "rockbox-" + version
15 ref = "refs/tags/v" + version + "-final"
16 refs = gitscraper.get_refs(repository)
17 if ref in refs:
18 tree = refs[ref]
19 else:
20 print("Could not find hash for version!")
21 sys.exit()
22 else:
23 tree = sys.argv[1]
24 basename = "rockbox-" + tree
26 gitscraper.archive_files(repository, tree, [], basename, archive="7z")
28 print("done.")