cookutils diff cook @ rev 246

cook: Add Godane patch to handle Hg branch
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 28 15:03:01 2011 +0200 (2011-05-28)
parents e35efad312d1
children 93cb8f6fb98c
line diff
     1.1 --- a/cook	Sat May 28 00:41:01 2011 +0200
     1.2 +++ b/cook	Sat May 28 15:03:01 2011 +0200
     1.3 @@ -217,7 +217,13 @@
     1.4  			gettext -e "Getting source from Hg...\n"
     1.5  			echo "URL: $url"
     1.6  			gettext "Cloning to: "; echo "$pwd/$pkgsrc"
     1.7 -			hg clone $url $pkgsrc || (echo "ERROR: hg clone $url" && exit 1)
     1.8 +			if [ "$BRANCH" ]; then
     1.9 +				echo "Hg branch: $BRANCH"
    1.10 +				hg clone $url --rev $BRANCH $pkgsrc || \
    1.11 +					(echo "ERROR: hg clone $url --rev $BRANCH" && exit 1)
    1.12 +			else
    1.13 +				hg clone $url $pkgsrc || (echo "ERROR: hg clone $url" && exit 1)
    1.14 +			fi
    1.15  			create_tarball ;;
    1.16  		git*)
    1.17  			url=${WGET_URL#git|}