Admin/Windows/Cygwin/setup_server
author wenzelm
Mon, 20 May 2024 15:43:51 +0200
changeset 80182 29f2b8ff84f3
parent 78304 e4b57eea7f86
permissions -rwxr-xr-x
proper support for "isabelle update -D DIR": avoid accidental exclusion of select_dirs (amending e5dafe9e120f);

#!/usr/bin/env bash

CYGWIN_MAIN="https://cygwin.com"
CYGWIN_MIRROR="https://ftp.eq.uc.pt/software/pc/prog/cygwin"

function fail()
{
  echo "$1" >&2
  exit 2
}

function download()
{
  local URL="$1"
  local DIR="${2:-.}"
  mkdir -p "$DIR" || fail "Cannot create directory: \"$DIR\""
  echo "Downloading $URL ..."
  curl --fail --silent --location "$URL" > "$DIR"/"$(basename "$URL")" || fail "FAILED"
}

download "$CYGWIN_MAIN/setup-x86_64.exe"
download "$CYGWIN_MIRROR/x86_64/setup.xz" "x86_64"
download "$CYGWIN_MIRROR/x86_64/setup.xz.sig" "x86_64"
download "$CYGWIN_MIRROR/x86_64/setup.zst" "x86_64"
download "$CYGWIN_MIRROR/x86_64/setup.zst.sig" "x86_64"