Merge branch 'fedora-setup' into 'main'

Fedora support in shell scripts

See merge request veilid/veilid!118
This commit is contained in:
Christien Rioux 2023-08-18 05:23:59 +00:00
commit 65cc254128
3 changed files with 24 additions and 6 deletions

View File

@ -6,9 +6,27 @@ if [ $(id -u) -eq 0 ]; then
exit exit
fi fi
# Install APT dependencies if [ ! -z "$(command -v apt)" ]; then
sudo apt update -y # Install APT dependencies
sudo apt install -y openjdk-11-jdk-headless iproute2 curl build-essential cmake libssl-dev openssl file git pkg-config libdbus-1-dev libdbus-glib-1-dev libgirepository1.0-dev libcairo2-dev checkinstall unzip llvm wabt checkinstall sudo apt update -y
sudo apt install -y openjdk-11-jdk-headless iproute2 curl build-essential cmake libssl-dev openssl file git pkg-config libdbus-1-dev libdbus-glib-1-dev libgirepository1.0-dev libcairo2-dev checkinstall unzip llvm wabt
elif [ ! -z "$(command -v dnf)" ]; then
# DNF (formerly yum)
sudo dnf update -y
# libgirepository -> gobject-introspection
# iproute2 -> iproute
# openjdk-11-jdk-headless -> java-11-openjdk-headless
# checkinstall does not appear to be a thing in Fedora 38 repos
#
# Seems like iproute and file might come preinstalled but I put
# them in anyway
#
# Also Fedora doesn't come with pip
sudo dnf install -y java-11-openjdk-headless iproute curl cmake openssl-devel openssl git file pkg-config dbus-devel dbus-glib gobject-introspection-devel cairo-devel unzip llvm wabt python3-pip gcc-c++
# build-essentials
sudo dnf groupinstall -y 'Development Tools'
fi
# Install Rust # Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -c clippy --profile default curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -c clippy --profile default

View File

@ -10,7 +10,7 @@ if [ "$EUID" -ne 0 ]; then
sudo checkinstall --pkgversion=$VERSION -y cp -r bin include /usr/local/ sudo checkinstall --pkgversion=$VERSION -y cp -r bin include /usr/local/
cp *.deb ~ cp *.deb ~
else else
sudo make install sudo cp -r bin include /usr/local/
fi fi
popd popd
sudo rm -rf /tmp/protoc-install sudo rm -rf /tmp/protoc-install
@ -19,7 +19,7 @@ else
checkinstall --pkgversion=$VERSION -y cp -r bin include /usr/local/ checkinstall --pkgversion=$VERSION -y cp -r bin include /usr/local/
cp *.deb ~ cp *.deb ~
else else
make install cp -r bin include /usr/local/
fi fi
popd popd
rm -rf /tmp/protoc-install rm -rf /tmp/protoc-install

View File

@ -8,7 +8,7 @@ if [[ "$(uname)" != "Linux" ]]; then
exit 1 exit 1
fi fi
if [ "$(lsb_release -d | grep -qEi 'debian|buntu|mint')" ]; then if ! lsb_release -d | grep -qEi 'debian|buntu|mint' && [ -z "$(command -v dnf)" ]; then
echo Not a supported Linux echo Not a supported Linux
exit 1 exit 1
fi fi