# HG changeset patch # User wenzelm # Date 1468491620 -7200 # Node ID 9416333a17c2ee25c7f11dd2aef3951ebbe0b86e # Parent cd540c8031a41b33e7961c92a901a86377ab4f81 prefer curl: presumably more portable and versatile; diff -r cd540c8031a4 -r 9416333a17c2 Admin/lib/Tools/makedist_bundle --- a/Admin/lib/Tools/makedist_bundle Thu Jul 14 11:34:18 2016 +0200 +++ b/Admin/lib/Tools/makedist_bundle Thu Jul 14 12:20:20 2016 +0200 @@ -113,9 +113,11 @@ echo " component $COMPONENT" CONTRIB="$ARCHIVE_DIR/contrib/${COMPONENT}.tar.gz" if [ ! -f "$CONTRIB" ]; then + type -p curl > /dev/null || fail "Cannot download files: missing curl" REMOTE="$ISABELLE_COMPONENT_REPOSITORY/${COMPONENT}.tar.gz" - echo " download $REMOTE" - perl -MLWP::Simple -e "getprint '$REMOTE';" > "$CONTRIB" + echo " downloading $REMOTE" + curl --fail --silent "$REMOTE" > "$CONTRIB" || \ + fail "Failed to download \"$REMOTE\"" perl -e "exit((stat('${CONTRIB}'))[7] == 0 ? 0 : 1);" && exit 2 fi diff -r cd540c8031a4 -r 9416333a17c2 Admin/lib/Tools/makedist_cygwin --- a/Admin/lib/Tools/makedist_cygwin Thu Jul 14 11:34:18 2016 +0200 +++ b/Admin/lib/Tools/makedist_cygwin Thu Jul 14 12:20:20 2016 +0200 @@ -43,7 +43,9 @@ [ ! -e "$TARGET" ] || fail "Target already exists: \"$TARGET\"" mkdir -p "$TARGET/isabelle" || fail "Failed to create target directory: \"$TARGET\"" -perl -MLWP::Simple -e "getprint '$CYGWIN_MIRROR/setup-x86.exe';" > "$TARGET/isabelle/cygwin.exe" +type -p curl > /dev/null || fail "Cannot download files: missing curl" +curl --fail --silent "$CYGWIN_MIRROR/setup-x86.exe" > "$TARGET/isabelle/cygwin.exe" || \ + fail "Failed to download \"$CYGWIN_MIRROR/setup-x86.exe\"" chmod +x "$TARGET/isabelle/cygwin.exe" "$TARGET/isabelle/cygwin.exe" -h /dev/null || exit 2 @@ -55,7 +57,7 @@ --site "$CYGWIN_MIRROR" --no-verify \ --local-package-dir 'C:\temp' \ --root "$(cygpath -w "$TARGET")" \ - --packages perl,perl-libwww-perl,rlwrap,unzip,nano \ + --packages curl,nano,perl,perl-libwww-perl,rlwrap,unzip \ --no-shortcuts --no-startmenu --no-desktop --quiet-mode [ "$?" = 0 -a -e "$TARGET/etc" ] || exit 2 diff -r cd540c8031a4 -r 9416333a17c2 README_REPOSITORY --- a/README_REPOSITORY Thu Jul 14 11:34:18 2016 +0200 +++ b/README_REPOSITORY Thu Jul 14 12:20:20 2016 +0200 @@ -4,11 +4,11 @@ Quick start in 30min -------------------- -1a. Linux and Mac OS X: ensure that Perl (with libwww) and Mercurial (hg) - is installed (see also http://www.selenic.com/mercurial) +1a. Linux and Mac OS X: ensure that Mercurial is installed + (see also http://www.selenic.com/mercurial) -1b. Windows: ensure that Cygwin with Perl and Mercurial is installed (see - also http://www.cygwin.com) +1b. Windows: ensure that Cygwin with curl and Mercurial is installed + (see also http://www.cygwin.com) 2. Clone repository (bash shell commands): diff -r cd540c8031a4 -r 9416333a17c2 lib/Tools/components --- a/lib/Tools/components Thu Jul 14 11:34:18 2016 +0200 +++ b/lib/Tools/components Thu Jul 14 12:20:20 2016 +0200 @@ -124,9 +124,11 @@ else if [ ! -e "${FULL_NAME}.tar.gz" ]; then REMOTE="$COMPONENT_REPOSITORY/${BASE_NAME}.tar.gz" + type -p curl > /dev/null || fail "Cannot download files: missing curl" echo "Getting \"$REMOTE\"" mkdir -p "$(dirname "$FULL_NAME")" - perl -MLWP::Simple -e "getprint '$REMOTE';" > "${FULL_NAME}.tar.gz" + curl --fail --silent "$REMOTE" > "${FULL_NAME}.tar.gz" || \ + fail "Failed to download \"$REMOTE\"" if perl -e "exit((stat('${FULL_NAME}.tar.gz'))[7] == 0 ? 0 : 1);" then rm -f "${FULL_NAME}.tar.gz"