diff options
| author | Luqman Aden <laden@csclub.uwaterloo.ca> | 2013-06-29 22:22:20 -0400 |
|---|---|---|
| committer | Luqman Aden <laden@csclub.uwaterloo.ca> | 2013-06-30 02:08:02 -0400 |
| commit | 9c3ef892f90289b6af77cbfe6c50dfb56eeb4c17 (patch) | |
| tree | 190c18ce8b95faa57da03d453f794841bb9e639d | |
| parent | c6b0d4f51610401355a27eb2c5f607e913b74be9 (diff) | |
| download | rust-9c3ef892f90289b6af77cbfe6c50dfb56eeb4c17.tar.gz rust-9c3ef892f90289b6af77cbfe6c50dfb56eeb4c17.zip | |
configure: Require one of wget or curl.
| -rwxr-xr-x | configure | 2 | ||||
| -rw-r--r-- | src/etc/snapshot.py | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/configure b/configure index d0a98fbfa75..12782fa9fdb 100755 --- a/configure +++ b/configure @@ -402,7 +402,7 @@ fi step_msg "looking for build programs" probe_need CFG_PERL perl -probe_need CFG_CURL curl +probe_need CFG_CURLORWGET curl wget probe_need CFG_PYTHON python2.7 python2.6 python2 python python_version=$($CFG_PYTHON -V 2>&1) diff --git a/src/etc/snapshot.py b/src/etc/snapshot.py index 608dbdcca5d..36b00a3dedf 100644 --- a/src/etc/snapshot.py +++ b/src/etc/snapshot.py @@ -1,6 +1,6 @@ # xfail-license -import re, os, sys, glob, tarfile, shutil, subprocess, tempfile +import re, os, sys, glob, tarfile, shutil, subprocess, tempfile, distutils.spawn try: import hashlib @@ -132,7 +132,13 @@ def local_rev_committer_date(): def get_url_to_file(u,f): # no security issue, just to stop partial download leaving a stale file tmpf = f + '.tmp' - returncode = subprocess.call(["curl", "-o", tmpf, u]) + + returncode = -1 + if distutils.spawn.find_executable("curl"): + returncode = subprocess.call(["curl", "-o", tmpf, u]) + elif distutils.spawn.find_executable("wget"): + returncode = subprocess.call(["wget", "-O", tmpf, u]) + if returncode != 0: os.unlink(tmpf) raise |
