forked from curl/curl-for-win
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_build-runner.sh
executable file
·72 lines (61 loc) · 1.92 KB
/
_build-runner.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
# Copyright (C) Viktor Szakats. See LICENSE.md
# SPDX-License-Identifier: MIT
# WORK-IN-PROGRESS / EXPERIMENTAL
# This script makes a local curl (and dependencies) build.
# Start it in a curl-for-win repo sandbox.
# Output is generated in the same directory.
# shellcheck disable=SC3040
set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o pipefail
cd "$(dirname "$0")"
# Customize these
export CW_CONFIG='dev-x64-big-cares'
#export CURL_REV_='master'
#CURL_SCRIPT='curl-cmake' # curl-gnumake (default) or curl-cmake or curl-autotools
# Install necessary packages
if [ ! -f .cw-initialized ]; then
case "$(uname)" in
*_NT*)
pacman --noconfirm --ask 20 --noprogressbar --sync --needed \
mingw-w64-x86_64-{cmake,jq,python-pefile,gettext} \
zip
[[ "${CW_CONFIG}" = *'boringssl'* ]] && \
pacman --noconfirm --ask 20 --noprogressbar --sync --needed \
mingw-w64-x86_64-{go,nasm}
;;
Linux*)
apt-get --quiet 2 --option Dpkg::Use-Pty=0 install \
curl git gpg python3-pefile make cmake \
autoconf automake autopoint libtool \
zip time jq dos2unix
[[ "${CW_CONFIG}" = *'boringssl'* ]] && \
apt-get --quiet 2 --option Dpkg::Use-Pty=0 install \
golang nasm
;;
Darwin*)
brew install \
xz gnu-tar gettext jq dos2unix
[[ "${CW_CONFIG}" = *'boringssl'* ]] && \
brew install \
go nasm
;;
esac
touch .cw-initialized
fi
# Not much to customize here
export CW_LLVM_MINGW_DL=1
export CW_LLVM_MINGW_ONLY=1
export CW_NOTIME=1
export CW_MAP=1
export CW_JOBS=2
export VIRUSTOTAL_APIKEY=
export SIGN_CODE_GPG_PASS=
export SIGN_CODE_KEY_PASS=
export SIGN_PKG_KEY_ID=
export SIGN_PKG_GPG_PASS=
export SIGN_PKG_KEY_PASS=
export DEPLOY_GPG_PASS=
export DEPLOY_KEY_PASS=
# Run
ln -s -f "${CURL_SCRIPT}" curl
./_build.sh 2>&1 | stdbuf -i0 -o0 -e0 tee "log-$(date '+%s').txt"