22
33set -x
44
5+ VCPKG_COMMIT=" 608d1dbcd6969679f82b1ca6b89d58939c9b228e"
6+
57# Ubuntu/Debian
68apt=$( command -v apt-get || true)
79if [ -n " $apt " ]; then
810 apt-get update -q -y
11+
12+ # if setup-cpp not installed
13+ if [ -z " $( command -v setup-cpp || true) " ]; then
14+ apt-get install --no-install-recommends -y \
15+ bash \
16+ gnupg \
17+ ca-certificates \
18+ curl
19+
20+ # install latest nodejs
21+ mkdir -p /etc/apt/keyrings
22+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
23+ echo " deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
24+ apt-get update -qq
25+ apt-get install -y --no-install-recommends nodejs
26+
27+ npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT
28+ fi
29+
930 apt-get install --no-install-recommends -y \
10- bash \
11- build-essential \
12- curl \
13- git \
14- g++ \
15- make \
16- ninja-build \
17- pkg-config \
18- unzip \
19- zip \
20- python3 \
21- tar \
22- cmake \
23- ninja-build \
2431 automake \
2532 autoconf \
26- libtool \
27- nodejs \
28- npm
33+ libtool
2934fi
3035
3136# Alpine Linux
@@ -34,46 +39,41 @@ if [ -n "$apk" ]; then
3439 apk update
3540 apk add --no-cache bash build-base curl git g++ make ninja-build pkgconfig unzip zip python3 tar cmake musl-dev automake autoconf libtool nodejs npm
3641 cp /usr/lib/ninja-build/bin/ninja /usr/bin/ninja
42+
43+ # vcpkg
44+ export VCPKG_FORCE_SYSTEM_BINARIES=1
45+ git clone https://github.com/microsoft/vcpkg.git ~ /vcpkg
46+ cd ~ /vcpkg || exit 1
47+ git checkout " $VCPKG_COMMIT "
48+ ~ /vcpkg/bootstrap-vcpkg.sh
49+ cd - || exit 1
3750fi
3851
3952# Fedora/RHEL
4053dnf=$( command -v dnf || true)
4154if [ -n " $dnf " ]; then
4255 dnf update -q -y
56+
57+ # if setup-cpp not installed
58+ if [ -z " $( command -v setup-cpp || true) " ]; then
59+ dnf install -y \
60+ bash \
61+ nodejs
62+
63+ npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT --git true
64+ fi
65+
4366 dnf install -y \
44- bash \
45- build-essential \
46- curl \
47- git \
48- g++ \
49- make \
50- ninja-build \
51- pkg-config \
52- unzip \
53- zip \
54- python3 \
55- tar \
56- cmake \
57- ninja-build \
5867 automake \
5968 autoconf \
60- libtool \
61- nodejs
69+ libtool
6270fi
6371
64- # pnpm
65- npm i -g pnpm
66-
67- export VCPKG_FORCE_SYSTEM_BINARIES=1
68-
69- # vcpkg
70- git clone https://github.com/microsoft/vcpkg.git ~ /vcpkg
71- cd ~ /vcpkg || exit 1
72- git checkout " ee2d2a100103e0f3613c60655dcf15be7d5157b8"
73- ~ /vcpkg/bootstrap-vcpkg.sh
74- cd - || exit 1
75-
7672# zeromq
7773cd ~ /vcpkg || exit 1
74+ git checkout " $VCPKG_COMMIT " --force
7875~ /vcpkg/vcpkg install ' zeromq[draft,curve,sodium]' || (cd - || exit 1)
7976cd - || exit 1
77+
78+ # pnpm
79+ npm i -g pnpm
0 commit comments