Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4c52f0aba7653a4154fe3110b7cb3e93 > files > 3

mozilla-adblockplus-1.1.3-2.fc15.src.rpm

#!/bin/bash

set -e

version="$1"
if [ -z "$version" ] ; then
    echo "Usage: $0 VERSION"
    echo "  For example $0 1.1.3"
    exit 1
fi

tmp=$(mktemp -d)

trap cleanup EXIT
cleanup() {
    set +e
    [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
}

unset CDPATH
pwd=$(pwd)

cd "$tmp"
hg clone https://hg.adblockplus.org/adblockplus/
cd adblockplus
hg archive --type tbz2 --rev "ADBLOCK_PLUS_${version//./_}_RELEASE" \
    --prefix "mozilla-adblockplus-$version" \
    "$pwd/mozilla-adblockplus-$version.tar.bz2"
cd ..
hg clone https://hg.adblockplus.org/buildtools/
cd buildtools
hg archive --type tbz2 --rev "ADBLOCK_PLUS_${version//./_}_RELEASE" \
    --prefix buildtools "$pwd/mozilla-adblockplus-$version-buildtools.tar.bz2"
cd "$pwd"