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 @@ -#!/bin/sh - -version="3.0" - -srcdir=. -tempdir=rockbox-temp -outfile=rockbox-$version.7z - -# remove previous leftovers -rm -rf $tempdir - -cd $srcdir - -# create the dir name based on revision number -rbdir=$tempdir/rockbox-$version - -# create new temp dir -mkdir -p $rbdir - -# copy everything to the temp dir -svn ls -R | xargs -Imoo cp --parents moo $rbdir 2>/dev/null - -cd $tempdir - -rm -f $outfile - -# 7zip the entire directory -7zr a $outfile rockbox* - -# world readable please -chmod a+r $outfile - -# remove temporary files -rm -rf $tempdir diff --git a/utils/common/tarball.py b/utils/common/tarball.py new file mode 100755 index 0000000000..11570c46b3 --- /dev/null +++ b/utils/common/tarball.py @@ -0,0 +1,23 @@ +#!/usr/bin/python + +import gitscraper +import tempfile +import subprocess +import os +import shutil + +version = "v3.11" +repository = "." +basename = "rockbox-" + version +tree = gitscraper.get_refs(repository)["refs/remotes/origin/" + version] +tmpbase = tempfile.mkdtemp() +tmpdir = tmpbase + "/" + basename + +gitscraper.archive_files(repository, tree, [], basename, tmpdir) + +print "7z-ing files" +output = subprocess.Popen(["7z", "a", + os.path.join(os.getcwd(), basename + ".7z"), basename], cwd=tmpbase) +cmdout = output.communicate() + +shutil.rmtree(tmpbase)