All pastes #962361 Raw Edit

Stuff

public text v1 · immutable
#962361 ·published 2008-03-29 18:39 UTC
rendered paste body
#!/bin/sh

srcdir=~/src/rockbox
tarball=/tmp/rockbox.tar
tempdir=/tmp/rockbox-temp
outfile=/tmp/rockbox.7z

# remove previous leftovers
rm -rf $tempdir $tarball

cd $srcdir

# get the svn revision
version=`svnversion`

# 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 $tarball