File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,19 @@ CPUS=$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/
1212
1313echo " Installing dependencies"
1414if [[ " $OSTYPE " == " linux-gnu" * ]]; then # Linux
15- sudo apt-get update --yes
16- sudo apt-get install --yes cmake graphviz llvm clang pkg-config m4 \
15+ SUDO=' '
16+ if command -v sudo > /dev/null; then
17+ # sudo is present on the system, so use it
18+ SUDO=' sudo'
19+ fi
20+ $SUDO apt-get update --yes
21+ $SUDO apt-get install --yes cmake graphviz llvm clang pkg-config m4 \
1722 wget curl python3-distutils python3-dev
1823 # Install Doxygen
1924 # the newest version in Ubuntu 20.04 repository is 1.8.17, but we need Doxygen 1.9 series
2025 wget -c -q https://www.doxygen.nl/files/doxygen-1.9.7.linux.bin.tar.gz
2126 tar xf doxygen-1.9.7.linux.bin.tar.gz
22- cd doxygen-1.9.7 && sudo make install && cd -
27+ cd doxygen-1.9.7 && $SUDO make install && cd -
2328 rm -rf doxygen-1.9.7 doxygen-1.9.7.linux.bin.tar.gz
2429elif [[ " $OSTYPE " == " darwin" * ]]; then # macOS
2530 brew update || true # allow failure
You can’t perform that action at this time.
0 commit comments