Skip to content

Commit 75dfa4f

Browse files
fixes #1440 (fix etc/packager) (#1752)
* fixes #1440 * Update etc/packager Co-authored-by: Pierre Roux <[email protected]> --------- Co-authored-by: Pierre Roux <[email protected]>
1 parent 72c8678 commit 75dfa4f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

etc/packager

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,32 @@ fi
3333
# verify whether $TAG exists
3434
git 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"
3737
GITROOT=$(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
4042
if [ $VERSION == "dev" ]
4143
then
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"
4850
else
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"
6364
fi
@@ -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

Comments
 (0)