#!/bin/bash set -e set -x if [ -z $1 ] || [ $1 == "--help" ] || [ $1 == "-h" ] then cat < $pkgdir/opam git show "$BRANCH:mathcomp/$pkg/descr" > $pkgdir/descr sed -r "/^version/s?dev?$VERSION?" -i $pkgdir/opam sed -r "/^depends.*coq-mathcomp.*/s?dev?$VERSION?" -i $pkgdir/opam fi sed -r "/^(build|install)/s?make?make \"-C\" \"mathcomp/$pkg\"?" -i $pkgdir/opam echo $URLLINE > $pkgdir/url if [ $VERSION != "dev" ] then echo $CHECKSUMLINE >> $pkgdir/url fi done # finally test the existence of the archive wget --spider $ARCHIVEURL