From 7d28da695934872303302799c7779c600f981da5 Mon Sep 17 00:00:00 2001 From: Cyril Cohen Date: Fri, 20 Oct 2017 02:00:05 +0200 Subject: improved package generator --- etc/utils/packager | 61 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/etc/utils/packager b/etc/utils/packager index af3c777..daee789 100755 --- a/etc/utils/packager +++ b/etc/utils/packager @@ -1,24 +1,45 @@ #!/bin/bash -# usage : packager VERSION [BRANCH] -# VERSION is the version number of the package to create, we expect -# there is a tag named mathcomp-$VERSION which archive we can -# download from github -# BRANCH is the name of a branch where we can find accurate local opam -# files. Actually, this may only matter for the Coq version dependencies -# located in the ssreflect package. - 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?$1?" -i $pkgdir/opam - sed -r "/^depends.*coq-mathcomp.*/s?dev?$1?" -i $pkgdir/opam + 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 [ $1 != "dev" ] + if [ $VERSION != "dev" ] then echo $CHECKSUMLINE >> $pkgdir/url fi done -- cgit v1.2.3