File getsource.sh of Package gst-fluendo-mp3

#! /bin/sh
#
# The sources are provided for reference only.
# Binary packages are not built from these sources.
# - jw@suse.de

name=gst-fluendo-mp3
svn=https://core.fluendo.com/gstreamer/svn/trunk/$name
export today=`date +%Y%m%d`
export tarball=$name-$today.tar.bz2

rm -rf $name
svn co $svn
tar jcvf $tarball --exclude .svn $name
cp $name/ChangeLog .
rm -rf $name
echo "$tarball written."

if [ -f "$name.spec" ]; then
  mv $name.spec $name.spec.old
  sed -e "s@^Source:\s.*\$@Source:         $tarball@" $name.spec.old > $name.spec
  echo "$name.spec <-- $tarball"
fi