From e899b6931d0d26203b364a7b5b8af1988aa815c4 Mon Sep 17 00:00:00 2001 From: pkr Date: Wed, 20 Nov 2024 18:30:52 +0100 Subject: [PATCH] Fix blfs scripts --- fixBlfsScripts.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 fixBlfsScripts.sh diff --git a/fixBlfsScripts.sh b/fixBlfsScripts.sh new file mode 100755 index 0000000..5965450 --- /dev/null +++ b/fixBlfsScripts.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +if [ -z "$1" ] || [ ! -d "$1" ] ; then + echo "Script folder not defied or does not exist." + exit 1 +fi + +MITKRB=$(find "$1" -type f -iname "*-mitkrb") +if [ -n "$MITKRB" ] ; then + echo "Patching file $MITKRB..." + sed -i "/default_realm =/s/$/PKR-LINUX/g;/ = {/s/ =/PKR-LINUX =/g;/\(kdc =\|admin_server =\)/s/PKR-LINUX/pkr-linux/g;/ . =/s/. =/.pkr-linux = PKR-LINUX/g;/host\/PKR-LINUX/s/PKR-LINUX/pkr-linux/g;/kdb5_util create -r/s/-r/-r PKR-LINUX/g" "$MITKRB" +fi + +QT6=$(find "$1" -type f -iname "*-qt6") +if [ -n "$QT6" ] ; then + echo "Patching file $QT6..." + sed -i "/^export \(C\|CXX\)FLAGS=/s/-O3/-O2/g" "$QT6" +fi