added utils functions to clean up usage of pipe to null device everywhere in script
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user