added utils functions to clean up usage of pipe to null device everywhere in script

This commit is contained in:
ag-tsotetsi
2026-02-08 12:26:13 +02:00
parent 54608a5d81
commit 32a40e8ae9

View File

@@ -15,4 +15,22 @@ create_sysroot() {
ln -fs lib "$SYSROOT/usr/lib64"
ln -fs usr/lib64 "$SYSROOT/lib64"
}
discard_out() {
"$@" > /dev/null
}
redirect_out() {
local path=$1; shift
"$@" > "$path"
}
discard_all() {
"$@" > /dev/null 2>&1
}
redirect_all() {
local path=$1; shift
"$@" > "$path" 2>&1
}