Skip to content

Commit

Permalink
[MRG] remove useless sudos
Browse files Browse the repository at this point in the history
  • Loading branch information
nlbxyz authored Oct 13, 2022
2 parents 10e39a3 + 9fdc891 commit 0224234
Showing 1 changed file with 75 additions and 81 deletions.
156 changes: 75 additions & 81 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -x

os_name=$(uname)

command_found() {
Expand All @@ -13,92 +11,88 @@ mkdir -p build
cd build

if [ "$os_name" = "Linux" ]; then
if grep ^NAME= /etc/os-release | grep -iq Ubuntu; then
arch=$(dpkg --print-architecture)
sudo apt update
sudo apt upgrade -y
sudo apt install python3-pip -y
sudo pip3 install conan
sudo apt install -y \
libudev-dev \
libgl-dev \
libx11-xcb-dev \
libfontenc-dev \
libxaw7-dev \
libxcomposite-dev \
libxcursor-dev \
libxdamage-dev \
libxfixes-dev \
libxi-dev \
libxinerama-dev \
libxmu-dev \
libxmuu-dev \
libxpm-dev \
libxrandr-dev \
libxres-dev \
libxss-dev \
libxtst-dev \
libxv-dev \
libxvmc-dev \
libxxf86vm-dev \
libxcb-render-util0-dev \
libxcb-xkb-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-shape0-dev \
libxcb-sync-dev \
libxcb-xfixes0-dev \
libxcb-xinerama0-dev \
libxcb-dri3-dev \
libxcb-util-dev \
libxcb-util0-dev
sudo apt install -f
if [ "$arch" = "amd64" ]; then
echo ubuntu
elif [ "$arch" = "arm64" ]; then
echo rpi
sudo apt install -y \
pkg-config \
libxkbfile-dev \
xkb-data \
uuid-dev
if [ -z "$DEV_SET" ]; then
if grep ^NAME= /etc/os-release | grep -iq Ubuntu; then
arch=$(dpkg --print-architecture)
sudo apt update
sudo apt upgrade -y
sudo apt install python3-pip -y
sudo pip3 install conan
sudo apt install -y \
libudev-dev \
libgl-dev \
libx11-xcb-dev \
libfontenc-dev \
libxaw7-dev \
libxcomposite-dev \
libxcursor-dev \
libxdamage-dev \
libxfixes-dev \
libxi-dev \
libxinerama-dev \
libxmu-dev \
libxmuu-dev \
libxpm-dev \
libxrandr-dev \
libxres-dev \
libxss-dev \
libxtst-dev \
libxv-dev \
libxvmc-dev \
libxxf86vm-dev \
libxcb-render-util0-dev \
libxcb-xkb-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-shape0-dev \
libxcb-sync-dev \
libxcb-xfixes0-dev \
libxcb-xinerama0-dev \
libxcb-dri3-dev \
libxcb-util-dev \
libxcb-util0-dev
sudo apt install -f
if [ "$arch" = "arm64" ]; then
sudo apt install -y \
pkg-config \
libxkbfile-dev \
xkb-data \
uuid-dev
fi
elif grep ^NAME= /etc/os-release | grep -iq Fedora; then
sudo dnf update -y
sudo dnf install -y cmake
sudo dnf install -y python3-pip
sudo pip3 install conan
sudo dnf install -y \
libudev-devel \
libfontenc-devel \
libXaw-devel \
libXcomposite-devel \
libXdmcp-devel \
libXtst-devel \
libxkbfile-devel \
libXres-devel \
libXScrnSaver-devel \
libXvMC-devel \
xorg-x11-xtrans-devel \
xcb-util-wm-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
libXdamage-devel \
xcb-util-devel \
xkeyboard-config-devel \
systemd-devel \
libuuid-devel
fi
elif grep ^NAME= /etc/os-release | grep -iq Fedora; then
echo dnf
sudo dnf update -y
sudo dnf install -y cmake
sudo dnf install -y python3-pip
sudo pip3 install conan
sudo dnf install -y \
libudev-devel \
libfontenc-devel \
libXaw-devel \
libXcomposite-devel \
libXdmcp-devel \
libXtst-devel \
libxkbfile-devel \
libXres-devel \
libXScrnSaver-devel \
libXvMC-devel \
xorg-x11-xtrans-devel \
xcb-util-wm-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
libXdamage-devel \
xcb-util-devel \
xkeyboard-config-devel \
systemd-devel \
libuuid-devel
fi
conan install .. --build=missing -s compiler.libcxx=libstdc++11
elif [ "$os_name" = "Darwin" ]; then
echo darwin
pip3 install conan
conan install .. --build=missing
else
echo windows
pip3 install conan
conan install .. --build=missing
fi
Expand Down

0 comments on commit 0224234

Please sign in to comment.