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
911 apt-get install --no-install-recommends -y \
1012 bash \
11- build-essential \
1213 gnupg \
1314 ca-certificates \
14- curl \
15- git \
16- g++ \
17- make \
18- ninja-build \
19- pkg-config \
20- unzip \
21- zip \
22- python3 \
23- tar \
24- automake \
25- autoconf \
26- libtool
15+ curl
2716
2817 # install latest nodejs
2918 mkdir -p /etc/apt/keyrings
@@ -32,15 +21,12 @@ if [ -n "$apt" ]; then
3221 apt-get update -qq
3322 apt-get install -y --no-install-recommends nodejs
3423
35- # install latest cmake
36- test -f /usr/share/doc/kitware-archive-keyring/copyright ||
37- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2> /dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg > /dev/null
38- echo ' deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list > /dev/null
39- test -f /usr/share/doc/kitware-archive-keyring/copyright ||
40- rm /usr/share/keyrings/kitware-archive-keyring.gpg
41- apt-get update
42- apt-get install -y --no-install-recommends kitware-archive-keyring
43- apt-get install -y --no-install-recommends cmake
24+ npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT
25+
26+ apt-get install --no-install-recommends -y \
27+ automake \
28+ autoconf \
29+ libtool
4430fi
4531
4632# Alpine Linux
@@ -49,6 +35,14 @@ if [ -n "$apk" ]; then
4935 apk update
5036 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
5137 cp /usr/lib/ninja-build/bin/ninja /usr/bin/ninja
38+
39+ # vcpkg
40+ export VCPKG_FORCE_SYSTEM_BINARIES=1
41+ git clone https://github.com/microsoft/vcpkg.git ~ /vcpkg
42+ cd ~ /vcpkg || exit 1
43+ git checkout " $VCPKG_COMMIT "
44+ ~ /vcpkg/bootstrap-vcpkg.sh
45+ cd - || exit 1
5246fi
5347
5448# Fedora/RHEL
@@ -57,38 +51,20 @@ if [ -n "$dnf" ]; then
5751 dnf update -q -y
5852 dnf install -y \
5953 bash \
60- build-essential \
61- curl \
62- git \
63- g++ \
64- make \
65- ninja-build \
66- pkg-config \
67- unzip \
68- zip \
69- python3 \
70- tar \
71- cmake \
72- ninja-build \
73- automake \
74- autoconf \
75- libtool \
7654 nodejs
77- fi
7855
79- # pnpm
80- npm i -g pnpm
56+ npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT --git true
8157
82- export VCPKG_FORCE_SYSTEM_BINARIES=1
83-
84- # vcpkg
85- git clone https://github.com/microsoft/vcpkg.git ~ /vcpkg
86- cd ~ /vcpkg || exit 1
87- git checkout " 608d1dbcd6969679f82b1ca6b89d58939c9b228e"
88- ~ /vcpkg/bootstrap-vcpkg.sh
89- cd - || exit 1
58+ dnf install -y \
59+ automake \
60+ autoconf \
61+ libtool
62+ fi
9063
9164# zeromq
9265cd ~ /vcpkg || exit 1
9366~ /vcpkg/vcpkg install ' zeromq[draft,curve,sodium]' || (cd - || exit 1)
9467cd - || exit 1
68+
69+ # pnpm
70+ npm i -g pnpm
0 commit comments