1
0
Fork 0
forked from len0rd/rockbox

Add a new tarball generation script. The old one depended on svn

Change-Id: I873ca9eec30f98c1355d87cd2de89456d08d016a
This commit is contained in:
Dominik Riebeling 2012-03-28 21:21:42 +02:00 committed by Frank Gevaerts
parent cbe1b5cf1c
commit 4ec74ee0fb
2 changed files with 23 additions and 34 deletions

View file

@ -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

23
utils/common/tarball.py Executable file
View file

@ -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)