summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-06-02 13:28:10 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-22 20:18:46 -0400
commite9491668640227a7ae7f6d0506d36af3a10cdd49 (patch)
tree37711c6df3bc022e45cf8205cfffa1af56a8a215 /mk
parent9ddf161492194edb321b87b1977eda8264df35aa (diff)
downloadhaskell-e9491668640227a7ae7f6d0506d36af3a10cdd49.tar.gz
get-win32-tarballs: Fix detection of missing tarballs
This fixes the error message given by configure when the user attempts to configure without first download the win32 tarballs.
Diffstat (limited to 'mk')
-rwxr-xr-xmk/get-win32-tarballs.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/get-win32-tarballs.py b/mk/get-win32-tarballs.py
index 3c99682779..6686119204 100755
--- a/mk/get-win32-tarballs.py
+++ b/mk/get-win32-tarballs.py
@@ -5,6 +5,7 @@ from pathlib import Path
import urllib.request
import subprocess
import argparse
+import sys
from sys import stderr
TARBALL_VERSION = '0.2'
@@ -39,7 +40,8 @@ def fetch_arch(arch: str):
def verify(arch: str):
if not Path(DEST / arch / "SHA256SUMS").is_file():
- raise IOError("SHA256SUMS doesn't exist; have you fetched?")
+ print("SHA256SUMS doesn't exist; have you fetched?", file=stderr)
+ sys.exit(2)
cmd = ['sha256sum', '--quiet', '--check', '--ignore-missing', 'SHA256SUMS']
subprocess.check_call(cmd, cwd=DEST / arch)