LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File precheckin_cripple_tarball.sh of Package lmms (Project multimedia:apps)

# The following source parts of lmms may not be distributed for legal
# reasons (bnc#761147)
# Thus we have to cripple the source tree in a way that it still builds.

# Find source tarball + unpack
trap 'rm -f $tmp; echo 1>&2 "$0 failed"' EXIT
tarsource="$(echo lmms-*[0-9].tar.bz2)"
if [ ! -s "$tarsource" ] ; then
  echo "Error: cannot find source tarball"
  exit 1

rm -rf lmms-*-crippled.tar.bz2

# Cripple source
echo 1>&2 "Crippling..."

files=$(tar -tf ${tarsource} | fgrep /data/projects/OldStuff/Malex-Horizon4.mmp)

bzip2 -cd ${tarsource} > ${tmp}
tar --delete --file=${tmp} ${files}
bzip2 -c ${tmp} > ${tardest}

echo 1>&2 ""
echo 1>&2 "Successfully crippled tarball. :-("
echo 1>&2 ""

rm -rf $tmp
trap - EXIT
exit 0