mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Add a new tarball generation script. The old one depended on svn
Change-Id: I873ca9eec30f98c1355d87cd2de89456d08d016a
This commit is contained in:
parent
cbe1b5cf1c
commit
4ec74ee0fb
2 changed files with 23 additions and 34 deletions
|
@ -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
23
utils/common/tarball.py
Executable 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)
|
Loading…
Add table
Add a link
Reference in a new issue