3333# verify whether $TAG exists
3434git rev-parse --verify $TAG
3535
36- ARCHIVEURL=" https://github.com/math-comp/analysis/archive/ $TAG .tar.gz"
36+ ARCHIVEURL=" https://github.com/math-comp/analysis/releases/download/ $TAG /analysis- $TAG .tar.gz"
3737GITROOT=$( git rev-parse --show-toplevel)
3838
39+ SED=$( command -v gsed || echo " sed" )
40+
3941# we build the url file content and the list of packages, and where to put them
4042if [ $VERSION == " dev" ]
4143then
4244# variables useful for package construction
4345 URLLINE=" src: \" git+https://github.com/math-comp/analysis.git\" "
4446 PKGS=$( ls -fs -d -1 $GITROOT /* .opam \
45- | sed -r " s?.*coq-mathcomp-([^/]+).opam?\1?" \
47+ | $SED -r " s?.*coq-mathcomp-([^/]+).opam?\1?" \
4648 | paste -sd " " -)
4749 PKGPREFIX=" $GITROOT /opam/extra-dev/packages"
4850else
4951 ARCHIVE=$( mktemp)
50- PREFIX=$( echo analysis-$TAG | sed " s/\+/-/" )
51- git archive --format=tgz --output=$ARCHIVE \
52- --prefix=$PREFIX / $TAG # reproduce github archive
52+ PREFIX=$( echo analysis-$TAG | $SED " s/\+/-/" )
53+ wget -O $ARCHIVE $ARCHIVEURL
5354 SUM=$( sha256sum $ARCHIVE | cut -d " " -f 1)
5455 EXTRACTED=$( mktemp -d)
5556 tar -C $EXTRACTED -zxvf $ARCHIVE
5657# variables useful for package construction
5758 URLLINE=" src: \" $ARCHIVEURL \" "
5859 CHECKSUMLINE=" checksum: \" sha256=$SUM \" "
5960 PKGS=$( ls -fs -d -1 $EXTRACTED /* /* .opam \
60- | sed -r " s?.*coq-mathcomp-([^/]+).opam?\1?" \
61+ | $SED -r " s?.*coq-mathcomp-([^/]+).opam?\1?" \
6162 | paste -sd " " -)
6263 PKGPREFIX=" $GITROOT /opam/released/packages"
6364fi
@@ -71,7 +72,7 @@ do pkgdir="$PKGPREFIX/coq-mathcomp-$pkg/coq-mathcomp-$pkg.$VERSION"
7172 if [ $VERSION == " dev" ]
7273 then cp $GITROOT /coq-mathcomp-$pkg .opam $pkgdir /opam
7374 else git show " $BRANCH :coq-mathcomp-$pkg .opam" > $pkgdir /opam
74- sed -r " /^version/d" -i $pkgdir /opam
75+ $SED -r " /^version/d" -i $pkgdir /opam
7576 fi
7677 echo " " >> $pkgdir /opam
7778 echo " url {" >> $pkgdir /opam
0 commit comments