2021-06-07 22:14:25 +02:00
#!/bin/bash
2021-06-08 01:03:15 +02:00
# _ _ ____ _
# ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
2021-06-07 22:14:25 +02:00
set -e
2021-06-13 20:11:58 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Set up compiler
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-06-13 16:15:09 +02:00
case " $( cc -dumpmachine) " in
i686-*)
2021-06-13 17:44:41 +02:00
readonly MY_CPU = x86
2021-06-13 16:15:09 +02:00
readonly MY_MARCH = i386
readonly MY_MTUNE = intel
; ;
x86_64-*)
2021-06-13 17:44:41 +02:00
readonly MY_CPU = x64
2021-06-13 16:15:09 +02:00
readonly MY_MARCH = x86-64
readonly MY_MTUNE = corei7
; ;
*)
echo "Unknown compiler detected!" ;
exit 1
; ;
esac
2021-06-07 22:14:25 +02:00
2021-06-13 20:11:58 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Initialize paths
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-06-07 22:14:25 +02:00
readonly BASE_DIR = " $( dirname " $( readlink -f " ${ BASH_SOURCE [0] } " ) " ) "
2021-06-13 17:44:41 +02:00
readonly LIBS_DIR = " ${ BASE_DIR } /.libs/ ${ MY_CPU } "
find " ${ BASE_DIR } " -maxdepth 1 -type d -name " *- ${ MY_CPU } " -exec rm -rf "{}" \;
2021-06-13 16:15:09 +02:00
rm -rf " ${ LIBS_DIR } " && mkdir -p " ${ LIBS_DIR } /include " " ${ LIBS_DIR } /lib "
2021-06-07 22:14:25 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Download
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-06-08 16:36:12 +02:00
wget -4 -P " ${ LIBS_DIR } " https://zlib.net/zlib-1.2.11.tar.gz
wget -4 -P " ${ LIBS_DIR } " https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz
wget -4 -P " ${ LIBS_DIR } " https://github.com/google/brotli/archive/v1.0.9/brotli-1.0.9.tar.gz
wget -4 -P " ${ LIBS_DIR } " https://www.openssl.org/source/openssl-1.1.1k.tar.gz
2021-06-08 18:47:03 +02:00
wget -4 -P " ${ LIBS_DIR } " https://www.libssh2.org/download/libssh2-1.9.0.tar.gz
2021-06-08 16:36:12 +02:00
wget -4 -P " ${ LIBS_DIR } " https://github.com/nghttp2/nghttp2/releases/download/v1.43.0/nghttp2-1.43.0.tar.gz
wget -4 -P " ${ LIBS_DIR } " https://ftp.gnu.org/gnu/libidn/libidn2-2.3.1.tar.gz
2021-06-08 18:49:59 +02:00
wget -4 -P " ${ LIBS_DIR } " https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
2021-06-09 21:32:35 +02:00
wget -4 -P " ${ LIBS_DIR } " https://ftp.gnu.org/gnu/gsasl/libgsasl-1.10.0.tar.gz
2021-06-08 16:36:12 +02:00
wget -4 -P " ${ LIBS_DIR } " https://curl.se/download/curl-7.77.0.tar.gz
wget -4 -P " ${ LIBS_DIR } " https://curl.se/ca/cacert.pem
2021-06-08 21:19:35 +02:00
wget -4 -P " ${ LIBS_DIR } " https://curl.se/docs/manpage.html
2021-06-07 22:14:25 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# zlib
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== zlib ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly ZLIB_DIR = " ${ BASE_DIR } /zlib- ${ MY_CPU } "
2021-06-08 16:36:12 +02:00
pkg_zlib = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'zlib-*.tar.gz' | sort -rn | head -n1) "
2021-06-07 22:14:25 +02:00
rm -rf " ${ ZLIB_DIR } " && mkdir " ${ ZLIB_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_zlib } " --strip-components= 1 -C " ${ ZLIB_DIR } "
2021-06-07 22:14:25 +02:00
pushd " ${ ZLIB_DIR } "
2021-06-13 23:34:14 +02:00
make -f win32/Makefile.gcc libz.a LOC = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT=0x0501 "
2021-06-08 16:36:12 +02:00
cp -vf libz.a " ${ LIBS_DIR } /lib "
cp -vf zlib.h zconf.h " ${ LIBS_DIR } /include "
2021-06-07 22:14:25 +02:00
popd
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Zstandard
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== Zstandard ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly ZSTD_DIR = " ${ BASE_DIR } /zstd- ${ MY_CPU } "
2021-06-08 16:36:12 +02:00
pkg_zstd = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'zstd-*.tar.gz' | sort -rn | head -n1) "
2021-06-07 22:14:25 +02:00
rm -rf " ${ ZSTD_DIR } " && mkdir " ${ ZSTD_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_zstd } " --strip-components= 1 -C " ${ ZSTD_DIR } "
2021-06-07 22:14:25 +02:00
pushd " ${ ZSTD_DIR } "
2021-06-13 23:34:14 +02:00
CFLAGS = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT=0x0501 -I ${ LIBS_DIR } /include " LDFLAGS = " -L ${ LIBS_DIR } /lib " make lib
2021-06-08 16:36:12 +02:00
cp -vf lib/libzstd.a " ${ LIBS_DIR } /lib "
cp -vf lib/zstd.h lib/zstd_errors.h " ${ LIBS_DIR } /include "
2021-06-07 22:14:25 +02:00
popd
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Brotli
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== Brotli ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly BROT_DIR = " ${ BASE_DIR } /brotli- ${ MY_CPU } "
2021-06-08 16:36:12 +02:00
pkg_brot = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'brotli-*.tar.gz' | sort -rn | head -n1) "
2021-06-07 22:14:25 +02:00
rm -rf " ${ BROT_DIR } " && mkdir " ${ BROT_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_brot } " --strip-components= 1 -C " ${ BROT_DIR } "
2021-06-07 22:14:25 +02:00
pushd " ${ BROT_DIR } "
2021-06-13 23:34:14 +02:00
CFLAGS = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT=0x0501 -I ${ LIBS_DIR } /include " LDFLAGS = " -L ${ LIBS_DIR } /lib " make lib
2021-06-08 16:36:12 +02:00
mkdir -p " ${ LIBS_DIR } /include/brotli "
cp -vf libbrotli.a " ${ LIBS_DIR } /lib/libbrotlienc.a "
cp -vf libbrotli.a " ${ LIBS_DIR } /lib/libbrotlidec.a "
cp -vf c/include/brotli/*.h " ${ LIBS_DIR } /include/brotli "
2021-06-07 22:14:25 +02:00
popd
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# OpenSSL
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== OpenSSL ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly OSSL_DIR = " ${ BASE_DIR } /openssl- ${ MY_CPU } "
2021-06-08 16:36:12 +02:00
pkg_ossl = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'openssl-*.tar.gz' | sort -rn | head -n1) "
2021-06-07 22:14:25 +02:00
rm -rf " ${ OSSL_DIR } " && mkdir " ${ OSSL_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_ossl } " --strip-components= 1 -C " ${ OSSL_DIR } "
2021-06-13 17:44:41 +02:00
[ [ " ${ MY_CPU } " = = "x64" ] ] && readonly ossl_flag = "no-sse2" || readonly ossl_flag = "386"
[ [ " ${ MY_CPU } " = = "x64" ] ] && readonly ossl_mngw = "mingw64" || readonly ossl_mngw = "mingw"
2021-06-07 22:14:25 +02:00
pushd " ${ OSSL_DIR } "
2021-06-13 23:34:14 +02:00
./Configure no-hw no-shared no-engine no-capieng no-dso zlib ${ ossl_flag } -static -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT= 0x0501 -I" ${ LIBS_DIR } /include " -L" ${ LIBS_DIR } /lib " -latomic ${ ossl_mngw }
2021-06-07 22:14:25 +02:00
make build_libs
2021-06-08 16:36:12 +02:00
mkdir -p " ${ LIBS_DIR } /include/crypto " " ${ LIBS_DIR } /include/openssl "
cp -vf libcrypto.a libssl.a " ${ LIBS_DIR } /lib "
cp -vf include/crypto/*.h " ${ LIBS_DIR } /include/crypto "
cp -vf include/openssl/*.h " ${ LIBS_DIR } /include/openssl "
2021-06-07 22:14:25 +02:00
popd
2021-06-08 18:47:03 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# libssh2
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== libssh2 ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly SSH2_DIR = " ${ BASE_DIR } /libssh2- ${ MY_CPU } "
2021-06-08 18:47:03 +02:00
pkg_ssh2 = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'libssh2-*.tar.gz' | sort -rn | head -n1) "
rm -rf " ${ SSH2_DIR } " && mkdir " ${ SSH2_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_ssh2 } " --strip-components= 1 -C " ${ SSH2_DIR } "
2021-06-08 18:47:03 +02:00
pushd " ${ SSH2_DIR } "
2021-06-13 21:58:25 +02:00
patch -p1 -b < " ${ BASE_DIR } /patch/ssh2_session.diff "
2021-06-13 23:34:14 +02:00
CFLAGS = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT=0x0501 -I ${ LIBS_DIR } /include " LDFLAGS = " -L ${ LIBS_DIR } /lib " LIBS = "-latomic" ./configure --disable-examples-build --disable-shared --with-libz
2021-06-08 18:47:03 +02:00
make
2021-06-08 19:55:42 +02:00
cp -v src/.libs/libssh2.a " ${ LIBS_DIR } /lib "
2021-06-08 18:47:03 +02:00
cp -v include/libssh2.h include/libssh2_publickey.h include/libssh2_sftp.h " ${ LIBS_DIR } /include "
popd
2021-06-08 02:51:43 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# nghttp2
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== nghttp2 ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly NGH2_DIR = " ${ BASE_DIR } /nghttp2- ${ MY_CPU } "
2021-06-08 16:36:12 +02:00
pkg_ngh2 = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'nghttp2-*.tar.gz' | sort -rn | head -n1) "
2021-06-08 02:51:43 +02:00
rm -rf " ${ NGH2_DIR } " && mkdir " ${ NGH2_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_ngh2 } " --strip-components= 1 -C " ${ NGH2_DIR } "
2021-06-08 03:00:49 +02:00
pushd " ${ NGH2_DIR } "
2021-06-13 23:34:14 +02:00
CFLAGS = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT=0x0501 -I ${ LIBS_DIR } /include " LDFLAGS = " -L ${ LIBS_DIR } /lib " OPENSSL_CFLAGS = " -I ${ LIBS_DIR } /include " OPENSSL_LIBS = " -L ${ LIBS_DIR } /lib -lssl -lcrypto " ZLIB_CFLAGS = " -I ${ LIBS_DIR } /include " ZLIB_LIBS = " -L ${ LIBS_DIR } /lib -lz " ./configure --enable-lib-only --disable-threads --disable-shared
2021-06-08 02:51:43 +02:00
make
2021-06-08 16:36:12 +02:00
mkdir -p " ${ LIBS_DIR } /include/nghttp2 " " ${ LIBS_DIR } /pkgconfig "
cp -v lib/.libs/libnghttp2.a " ${ LIBS_DIR } /lib "
cp -v lib/includes/nghttp2/*.h " ${ LIBS_DIR } /include/nghttp2 "
cp -v lib/libnghttp2.pc " ${ LIBS_DIR } /pkgconfig "
popd
2021-06-08 17:35:58 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# libiconv
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== libiconv ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly ICNV_DIR = " ${ BASE_DIR } /libiconv- ${ MY_CPU } "
2021-06-08 17:35:58 +02:00
pkg_icnv = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'libiconv-*.tar.gz' | sort -rn | head -n1) "
rm -rf " ${ ICNV_DIR } " && mkdir " ${ ICNV_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_icnv } " --strip-components= 1 -C " ${ ICNV_DIR } "
2021-06-08 17:35:58 +02:00
pushd " ${ ICNV_DIR } "
2021-06-13 23:34:14 +02:00
CFLAGS = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT=0x0501 -I ${ LIBS_DIR } /include " LDFLAGS = " -L ${ LIBS_DIR } /lib " ./configure --disable-rpath --disable-shared
2021-06-08 17:35:58 +02:00
make
cp -v lib/.libs/libiconv.a " ${ LIBS_DIR } /lib "
cp -v include/iconv.h " ${ LIBS_DIR } /include "
popd
2021-06-08 16:36:12 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# libidn2
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== libidn2 ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly IDN2_DIR = " ${ BASE_DIR } /libidn2- ${ MY_CPU } "
2021-06-08 16:56:03 +02:00
pkg_idn2 = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'libidn2-*.tar.gz' | sort -rn | head -n1) "
2021-06-08 16:36:12 +02:00
rm -rf " ${ IDN2_DIR } " && mkdir " ${ IDN2_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_idn2 } " --strip-components= 1 -C " ${ IDN2_DIR } "
2021-06-08 16:36:12 +02:00
pushd " ${ IDN2_DIR } "
2021-06-13 23:34:14 +02:00
CFLAGS = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT=0x0501 -I ${ LIBS_DIR } /include " LDFLAGS = " -L ${ LIBS_DIR } /lib " ./configure --disable-shared --disable-doc --without-libiconv-prefix --without-libunistring-prefix --disable-valgrind-tests
2021-06-08 16:36:12 +02:00
make
cp -v lib/.libs/libidn2.a " ${ LIBS_DIR } /lib "
cp -v lib/idn2.h " ${ LIBS_DIR } /include "
2021-06-08 02:51:43 +02:00
popd
2021-06-09 21:32:35 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# libgsasl
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== libgsasl ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly SASL_DIR = " ${ BASE_DIR } /libgsasl- ${ MY_CPU } "
2021-06-09 21:32:35 +02:00
pkg_sasl = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'libgsasl-*.tar.gz' | sort -rn | head -n1) "
rm -rf " ${ SASL_DIR } " && mkdir " ${ SASL_DIR } "
2021-06-10 18:57:31 +02:00
tar -xvf " ${ pkg_sasl } " --strip-components= 1 -C " ${ SASL_DIR } "
2021-06-09 21:32:35 +02:00
pushd " ${ SASL_DIR } "
2021-06-09 23:12:30 +02:00
patch -p1 -b < " ${ BASE_DIR } /patch/gsasl_error.diff "
2021-06-13 23:34:14 +02:00
CFLAGS = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -D_WIN32_WINNT=0x0501 -I ${ LIBS_DIR } /include " LDFLAGS = " -L ${ LIBS_DIR } /lib " ./configure --disable-shared --disable-valgrind-tests --disable-obsolete -without-libintl-prefix
2021-06-09 21:32:35 +02:00
make
cp -v src/.libs/libgsasl.a " ${ LIBS_DIR } /lib "
cp -v src/gsasl.h src/gsasl-*.h " ${ LIBS_DIR } /include "
popd
2021-06-07 22:14:25 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# cURL
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== cURL ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly CURL_DIR = " ${ BASE_DIR } /curl- ${ MY_CPU } "
2021-06-08 16:36:12 +02:00
pkg_curl = " $( find " ${ LIBS_DIR } " -maxdepth 1 -name 'curl-*.tar.gz' | sort -rn | head -n1) "
2021-06-07 22:14:25 +02:00
rm -rf " ${ CURL_DIR } " && mkdir " ${ CURL_DIR } "
tar -xvf ${ pkg_curl } --strip-components= 1 -C " ${ CURL_DIR } "
pushd " ${ CURL_DIR } "
2021-06-09 19:47:18 +02:00
patch -p1 -b < " ${ BASE_DIR } /patch/curl_threads.diff "
patch -p1 -b < " ${ BASE_DIR } /patch/curl_tool_doswin.diff "
patch -p1 -b < " ${ BASE_DIR } /patch/curl_tool_parsecfg.diff "
2021-06-10 02:15:19 +02:00
patch -p1 -b < " ${ BASE_DIR } /patch/curl_url.diff "
2021-06-13 23:34:14 +02:00
CFLAGS = " -march= ${ MY_MARCH } -mtune= ${ MY_MTUNE } -I ${ LIBS_DIR } /include " CPPFLAGS = "-D_WIN32_WINNT=0x0501 -DNGHTTP2_STATICLIB -DUNICODE -D_UNICODE" LDFLAGS = " -static -no-pthread -L ${ LIBS_DIR } /lib " LIBS = "-latomic -liconv -lcrypt32" PKG_CONFIG_PATH = " ${ LIBS_DIR } /pkgconfig " ./configure --enable-static --disable-shared --disable-pthreads --disable-libcurl-option --disable-openssl-auto-load-config --with-zlib= " ${ LIBS_DIR } " --with-zstd= " ${ LIBS_DIR } " --with-brotli= " ${ LIBS_DIR } " --with-openssl= " ${ LIBS_DIR } " --with-libssh2= " ${ LIBS_DIR } " --with-nghttp2= " ${ LIBS_DIR } " --with-libidn2= " ${ LIBS_DIR } " --with-gsasl= " ${ LIBS_DIR } " --without-ca-bundle
2021-06-13 20:11:58 +02:00
make curl_LDFLAGS = "-all-static -municode -mconsole"
2021-06-08 21:19:35 +02:00
strip -s src/curl.exe
2021-06-07 22:14:25 +02:00
popd
2021-06-08 21:19:35 +02:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Output
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printf "\n==================== Output ====================\n\n"
2021-06-13 17:44:41 +02:00
readonly OUT_DIR = " ${ BASE_DIR } /.bin/ ${ MY_CPU } "
2021-06-13 16:24:31 +02:00
rm -rf " ${ OUT_DIR } " && mkdir -p " ${ OUT_DIR } "
2021-06-08 22:24:45 +02:00
pushd " ${ OUT_DIR } "
cp -vf " ${ CURL_DIR } /src/curl.exe " curl.exe
2021-06-09 17:54:39 +02:00
cp -vf " ${ LIBS_DIR } /cacert.pem " curl-ca-bundle.crt
2021-06-08 22:24:45 +02:00
cp -vf " ${ LIBS_DIR } /manpage.html " manpage.html
2021-06-10 00:01:32 +02:00
sed -n " /Configured to build curl\/libcurl: $/,/^[[:space:]]*Features:/p " " ${ CURL_DIR } /config.log " | sed -r "s/configure:[[:digit:]]+://" | sed -r "s/^[[:blank:]]*//" | unix2dos > config.log
2021-06-08 21:19:35 +02:00
mkdir -p " ${ OUT_DIR } /legal "
2021-06-08 22:24:45 +02:00
unix2dos -n " ${ BROT_DIR } /LICENSE " legal/brotli.LICENSE.txt
unix2dos -n " ${ BROT_DIR } /README.md " legal/brotli.README.md
2021-06-09 23:12:30 +02:00
unix2dos -n " ${ CURL_DIR } /CHANGES " legal/curl.CHANGES.txt
unix2dos -n " ${ CURL_DIR } /COPYING " legal/curl.COPYING.txt
unix2dos -n " ${ CURL_DIR } /README " legal/curl.README.txt
2021-06-08 22:24:45 +02:00
unix2dos -n " ${ ICNV_DIR } /AUTHORS " legal/libiconv.AUTHORS.txt
unix2dos -n " ${ ICNV_DIR } /COPYING " legal/libiconv.COPYING.txt
unix2dos -n " ${ ICNV_DIR } /README " legal/libiconv.README
unix2dos -n " ${ IDN2_DIR } /AUTHORS " legal/libidn2.AUTHORS.txt
unix2dos -n " ${ IDN2_DIR } /COPYING " legal/libidn2.COPYING.txt
unix2dos -n " ${ IDN2_DIR } /README.md " legal/libidn2.README.md
unix2dos -n " ${ NGH2_DIR } /AUTHORS " legal/nghttp2.AUTHORS.txt
unix2dos -n " ${ NGH2_DIR } /COPYING " legal/nghttp2.COPYING.txt
unix2dos -n " ${ NGH2_DIR } /README.rst " legal/nghttp2.README.rst
unix2dos -n " ${ OSSL_DIR } /AUTHORS " legal/openssl.AUTHORS.txt
unix2dos -n " ${ OSSL_DIR } /LICENSE " legal/openssl.LICENSE.txt
unix2dos -n " ${ OSSL_DIR } /README " legal/openssl.README.txt
2021-06-09 23:12:30 +02:00
unix2dos -n " ${ SASL_DIR } /AUTHORS " legal/libgsasl.AUTHORS.txt
unix2dos -n " ${ SASL_DIR } /COPYING " legal/libgsasl.COPYING.txt
unix2dos -n " ${ SASL_DIR } /README " legal/libgsasl.README.txt
2021-06-08 22:24:45 +02:00
unix2dos -n " ${ SSH2_DIR } /COPYING " legal/libssh2.COPYING.txt
unix2dos -n " ${ SSH2_DIR } /README " legal/libssh2.README.txt
unix2dos -n " ${ ZLIB_DIR } /README " legal/zlib.README.txt
unix2dos -n " ${ ZSTD_DIR } /LICENSE " legal/zstandard.LICENSE.txt
unix2dos -n " ${ ZSTD_DIR } /README.md " legal/zstandard.README.md
2021-06-09 23:12:30 +02:00
mkdir -p " ${ OUT_DIR } /patch "
2021-06-13 21:19:14 +02:00
cp -vf " ${ BASE_DIR } /patch/ " *.diff " ${ OUT_DIR } /patch "
2021-06-08 21:19:35 +02:00
find " ${ OUT_DIR } " -type f -exec chmod 444 "{}" \;
2021-06-13 20:14:23 +02:00
readonly zfile = " ${ BASE_DIR } /curl-windows- ${ MY_CPU } . $( date +"%Y-%m-%d" ) .zip "
2021-06-08 22:24:45 +02:00
rm -rf " ${ zfile } " && zip -v -r -9 " ${ zfile } " "."
chmod 444 " ${ zfile } "
popd
2021-06-08 21:19:35 +02:00
2021-06-07 22:14:25 +02:00
printf "\nCompleted.\n\n"