@@ -8,20 +8,24 @@ VCPKG_COMMIT="608d1dbcd6969679f82b1ca6b89d58939c9b228e"
88apt=$( command -v apt-get || true)
99if [ -n " $apt " ]; then
1010 apt-get update -q -y
11- apt-get install --no-install-recommends -y \
12- bash \
13- gnupg \
14- ca-certificates \
15- curl
1611
17- # install latest nodejs
18- mkdir -p /etc/apt/keyrings
19- curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
20- 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
21- apt-get update -qq
22- apt-get install -y --no-install-recommends nodejs
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
2326
24- npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT
27+ npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT
28+ fi
2529
2630 apt-get install --no-install-recommends -y \
2731 automake \
4953dnf=$( command -v dnf || true)
5054if [ -n " $dnf " ]; then
5155 dnf update -q -y
52- dnf install -y \
53- bash \
54- nodejs
5556
56- npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT --git true
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
5765
5866 dnf install -y \
5967 automake \
6371
6472# zeromq
6573cd ~ /vcpkg || exit 1
74+ git checkout " $VCPKG_COMMIT " --force
6675~ /vcpkg/vcpkg install ' zeromq[draft,curve,sodium]' || (cd - || exit 1)
6776cd - || exit 1
6877
0 commit comments