Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 83c3a5bf95be0fa90a9bd85fb937d6ce > files > 2

rubygem-hpricot-0.8.4-1.fc13.src.rpm

#!/bin/sh
set -x

# On the review request (rh bug 477526) it is found that
# boingboing.html are under CC-BY-NC (non-commercial)...
# too bad, not allowed on Fedora.

VERSION=${VERSION:-0.6.164}
URL=http://rubygems.org/downloads

wget -N ${URL}/hpricot-${VERSION}.gem

TMPDIR=$(mktemp -d /tmp/hpricot-XXXXXX)
tar -C $TMPDIR -xf hpricot-${VERSION}.gem
pushd $TMPDIR
mkdir TMP
tar -C TMP -xf data.tar.gz
cd TMP

# Remove CC-BY-NC licensed file
find . -name \*boingboing\* | xargs rm -f
# Recreate gem
VERSION=${VERSION} rake gem

popd
mv ${TMPDIR}/TMP/pkg/*.gem hpricot-${VERSION}-modified.gem
chmod 0644 hpricot-${VERSION}-modified.gem
rm -rf $TMPDIR