blob: a1103e86beb9c64c82bf8b121ed8c112553e0882 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl go-pup
# Fetches a list of all available source mirrors from the sage homepage.
# Note that the list is sorted by country, but fetchurl doesn't offer an option
# to customize mirror preference.
curl -s http://www.sagemath.org/download-source.html \
| pup 'table#mirror' \
| pup 'a attr{href}' \
| sed -e 's/index\.html/sage-${version}.tar.gz/'
|