@@ -7,21 +7,24 @@ VCPKG_COMMIT="608d1dbcd6969679f82b1ca6b89d58939c9b228e"
77# Ubuntu/Debian
88apt=$( command -v apt-get || true)
99if [ -n " $apt " ]; then
10- apt-get update -q -y
11- apt-get install --no-install-recommends -y \
12- bash \
13- gnupg \
14- ca-certificates \
15- curl
10+ # if setup-cpp not installed
11+ if [ -z " $( command -v setup-cpp || true) " ]; then
12+ apt-get update -q -y
13+ apt-get install --no-install-recommends -y \
14+ bash \
15+ gnupg \
16+ ca-certificates \
17+ curl
1618
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
19+ # install latest nodejs
20+ mkdir -p /etc/apt/keyrings
21+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
22+ 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
23+ apt-get update -qq
24+ apt-get install -y --no-install-recommends nodejs
2325
24- npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT
26+ npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT
27+ fi
2528
2629 apt-get install --no-install-recommends -y \
2730 automake \
4851# Fedora/RHEL
4952dnf=$( command -v dnf || true)
5053if [ -n " $dnf " ]; then
51- dnf update -q -y
52- dnf install -y \
53- bash \
54- nodejs
54+ # if setup-cpp not installed
55+ if [ -z " $( command -v setup-cpp || true) " ]; then
56+ dnf update -q -y
57+ dnf install -y \
58+ bash \
59+ nodejs
5560
56- npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT --git true
61+ npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT --git true
62+ fi
5763
5864 dnf install -y \
5965 automake \
6369
6470# zeromq
6571cd ~ /vcpkg || exit 1
72+ git checkout " $VCPKG_COMMIT " --force
6673~ /vcpkg/vcpkg install ' zeromq[draft,curve,sodium]' || (cd - || exit 1)
6774cd - || exit 1
6875
0 commit comments