From 4411b9cd08913ad7fe0833d88ccf69a8e5ffb2a4 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 7 Mar 2024 21:23:55 +0100 Subject: [PATCH] Disable makepkg's `debug` option by default --- scripts/Arch/Collections/personal.sh | 1 + scripts/Arch/Config/base-devel/install.sh | 12 ++++++++++++ scripts/Arch/Software/base-devel/install.sh | 10 ++++++++++ scripts/Arch/Software/yay/install.sh | 2 +- 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 scripts/Arch/Config/base-devel/install.sh create mode 100755 scripts/Arch/Software/base-devel/install.sh diff --git a/scripts/Arch/Collections/personal.sh b/scripts/Arch/Collections/personal.sh index aaac9c88..9a27488d 100755 --- a/scripts/Arch/Collections/personal.sh +++ b/scripts/Arch/Collections/personal.sh @@ -1,6 +1,7 @@ #!/bin/bash pushd "${BASH_SOURCE%/*}" > /dev/null; . "../Config/pacman/install.sh"; +. "../Software/base-devel/install.sh"; . "../Software/yay/install.sh"; # Firmware diff --git a/scripts/Arch/Config/base-devel/install.sh b/scripts/Arch/Config/base-devel/install.sh new file mode 100755 index 00000000..e1addbe4 --- /dev/null +++ b/scripts/Arch/Config/base-devel/install.sh @@ -0,0 +1,12 @@ +#!/bin/bash +pushd "${BASH_SOURCE%/*}" > /dev/null; + +configFile="/etc/makepkg.conf"; +pattern="^\\(OPTIONS=(.*[( ]\\)\\(debug[ )].*)\\)$"; + +if cat "$configFile" | grep "$pattern" > /dev/null +then + sudo sed -i "/$pattern/s/$pattern/\\1!\\2/" "$configFile" +fi; + +popd > /dev/null; diff --git a/scripts/Arch/Software/base-devel/install.sh b/scripts/Arch/Software/base-devel/install.sh new file mode 100755 index 00000000..90046c27 --- /dev/null +++ b/scripts/Arch/Software/base-devel/install.sh @@ -0,0 +1,10 @@ +#!/bin/bash +pushd "${BASH_SOURCE%/*}" > /dev/null; + +sudo pacman --noconfirm -Syu \ + base-devel \ + ; + +. "../../Config/base-devel/install.sh"; + +popd > /dev/null; diff --git a/scripts/Arch/Software/yay/install.sh b/scripts/Arch/Software/yay/install.sh index c06b5e0b..808e99ee 100755 --- a/scripts/Arch/Software/yay/install.sh +++ b/scripts/Arch/Software/yay/install.sh @@ -1,7 +1,7 @@ #!/bin/bash if ! command -v yay > /dev/null 2>&1 then - sudo pacman --noconfirm -S --needed git base-devel + sudo pacman --noconfirm -S --needed git contextRoot="$(mktemp -d)"; git clone https://aur.archlinux.org/yay.git "$contextRoot";