summaryrefslogtreecommitdiff
path: root/utils/common/tarball.py
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-04-12 21:14:11 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-04-12 21:15:49 +0200
commit2aae74545855e133d6f0e6ce56bbb8995fd1b51e (patch)
tree988e00bb652eb50310ef4f79cc92a45e184ada96 /utils/common/tarball.py
parente9d5f6cb61fb9ef997213b64b8086574f591f3a5 (diff)
downloadrockbox-2aae74545855e133d6f0e6ce56bbb8995fd1b51e.tar.gz
rockbox-2aae74545855e133d6f0e6ce56bbb8995fd1b51e.zip
Add new tarball generation script.
The old script depended on svn. An earlier version of this script has already been used in the 3.11. branch. Change-Id: Id03abb8f7bd005ede343243194c4453f0b2e8943
Diffstat (limited to 'utils/common/tarball.py')
-rwxr-xr-xutils/common/tarball.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/utils/common/tarball.py b/utils/common/tarball.py
new file mode 100755
index 0000000000..57765a55c7
--- /dev/null
+++ b/utils/common/tarball.py
@@ -0,0 +1,30 @@
1#!/usr/bin/python
2
3import gitscraper
4import os
5import sys
6
7if len(sys.argv) < 2:
8 print "Usage: %s <version|hash>" % sys.argv[0]
9 sys.exit()
10
11repository = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")
12if '.' 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()
22else:
23 tree = sys.argv[1]
24 basename = "rockbox-" + tree
25
26gitscraper.archive_files(repository, tree, [], basename, archive="7z")
27
28print "done."
29
30