From 4ea2912e73cc88e0aec6c13a109a4968e1e79c98 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sat, 5 Oct 2024 15:15:31 +0900 Subject: [PATCH] Simplify --- install-build-deps.sh | 25 +++++++++++-------------- install-cross-tools.sh | 4 ++-- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/install-build-deps.sh b/install-build-deps.sh index 16a1eddc1b..5ff894387d 100755 --- a/install-build-deps.sh +++ b/install-build-deps.sh @@ -7,43 +7,40 @@ set -e set -x -case "$ID-$VERSION_ID" in -ubuntu-20.* | pop-20.*) - apt-get update - apt-get install -y cmake gcc g++ g++-10 - ;; -ubuntu-* | pop-* | linuxmint-* | debian-* | raspbian-* | neon-*) +case "$ID" in +ubuntu | pop | linuxmint | debian | raspbian | neon) apt-get update apt-get install -y cmake gcc g++ + [ "$ID-$VERSION_ID" = ubuntu-20.04 ] && apt-get install -y g++-10 ;; -fedora-* | amzn-* | rhel-*) +fedora | amzn | rhel) dnf install -y gcc-g++ cmake glibc-static libstdc++-static diffutils util-linux ;; opensuse-*) zypper install -y make cmake gcc-c++ glibc-devel-static tar diffutils util-linux ;; -gentoo-*) +gentoo) emerge-webrsync FEATURES='getbinpkg binpkg-request-signature' emerge dev-build/cmake ;; -arch-* | archarm-* | artix-* | endeavouros-*) +arch | archarm | artix | endeavouros) pacman -Sy --needed --noconfirm base-devel cmake util-linux ;; -void-*) +void) xbps-install -Sy xbps bash make cmake gcc tar diffutils util-linux ;; -alpine-*) +alpine) apk update apk add bash make linux-headers cmake gcc g++ ;; -clear-linux-*) +clear-linux-os) swupd update swupd bundle-add c-basic diffutils ;; -almalinux-*) +almalinux) dnf install -y gcc-toolset-13-gcc-c++ gcc-toolset-13-libstdc++-devel cmake diffutils ;; -freebsd-*) +freebsd) pkg update pkg install -y cmake bash binutils gcc ;; diff --git a/install-cross-tools.sh b/install-cross-tools.sh index fcac8ef8f4..e89e886a37 100755 --- a/install-cross-tools.sh +++ b/install-cross-tools.sh @@ -9,8 +9,8 @@ set -x # # Feel free to send me a PR if your OS is not on this list. -case "$ID-$VERSION_ID" in -ubuntu-* | pop-* | linuxmint-* | debian-* | raspbian-*) +case "$ID" in +ubuntu | pop | linuxmint | debian | raspbian) apt-get install -y qemu-user {gcc,g++}-{i686,aarch64,riscv64,powerpc,powerpc64,powerpc64le,s390x,sparc64,m68k,sh4}-linux-gnu {gcc,g++}-arm-linux-gnueabihf ;; *)