summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/release/tarball.sh34
-rwxr-xr-xutils/common/tarball.py30
2 files changed, 30 insertions, 34 deletions
diff --git a/tools/release/tarball.sh b/tools/release/tarball.sh
deleted file mode 100755
index 21335dd954..0000000000
--- a/tools/release/tarball.sh
+++ /dev/null
@@ -1,34 +0,0 @@
1#!/bin/sh
2
3version="3.0"
4
5srcdir=.
6tempdir=rockbox-temp
7outfile=rockbox-$version.7z
8
9# remove previous leftovers
10rm -rf $tempdir
11
12cd $srcdir
13
14# create the dir name based on revision number
15rbdir=$tempdir/rockbox-$version
16
17# create new temp dir
18mkdir -p $rbdir
19
20# copy everything to the temp dir
21svn ls -R | xargs -Imoo cp --parents moo $rbdir 2>/dev/null
22
23cd $tempdir
24
25rm -f $outfile
26
27# 7zip the entire directory
287zr a $outfile rockbox*
29
30# world readable please
31chmod a+r $outfile
32
33# remove temporary files
34rm -rf $tempdir
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