##// END OF EJS Templates
largefiles: restore archiving largefiles with hgweb (issue4859)...
largefiles: restore archiving largefiles with hgweb (issue4859) This regressed in 7699d3212994, when trying to conditionally disable archiving of largefiles. I'm not sure if wrapfunction() is the right way to do this, but it seems to work. The mysterious issue with lfstatus getting out of sync in the proxy and the unfiltered view crops up again here. See the referenced cset for more info.

File last commit:

r26148:7f49efca default
r26417:9a466b9f 3.5.2 stable
Show More
builddeb
62 lines | 1.3 KiB | text/plain | TextLexer
#!/bin/sh -e
#
# Build a Mercurial debian package from the current repo
#
# Tested on Jessie (stable as of original script authoring.)
. $(dirname $0)/packagelib.sh
BUILD=1
DEBBUILDDIR="$PWD/debbuild"
while [ "$1" ]; do
case "$1" in
--prepare )
shift
BUILD=
;;
--debbuilddir )
shift
DEBBUILDDIR="$1"
shift
;;
* )
echo "Invalid parameter $1!" 1>&2
exit 1
;;
esac
done
set -u
rm -rf $DEBBUILDDIR
mkdir -p $DEBBUILDDIR
if [ ! -d .hg ]; then
echo 'You are not inside a Mercurial repository!' 1>&2
exit 1
fi
gethgversion
cp -r $PWD/contrib/debian $DEBBUILDDIR/DEBIAN
chmod -R 0755 $DEBBUILDDIR/DEBIAN
control=$DEBBUILDDIR/DEBIAN/control
# This looks like sed -i, but sed -i behaves just differently enough
# between BSD and GNU sed that I gave up and did the dumb thing.
sed "s/__VERSION__/$version/" < $control > $control.tmp
mv $control.tmp $control
if [ "$BUILD" ]; then
dpkg-deb --build $DEBBUILDDIR
mv $DEBBUILDDIR.deb $DEBBUILDDIR/mercurial-$version-$release.deb
if [ $? = 0 ]; then
echo
echo "Built packages for $version-$release:"
find $DEBBUILDDIR/ -type f -newer $control
fi
else
echo "Prepared sources for $version-$release $control are in $DEBBUILDDIR - use like:"
echo "dpkg-deb --build $DEBBUILDDIR"
fi