Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
fix it?
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaudill committed Oct 26, 2023
1 parent 9b33ffe commit e3b7c6c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ parse_basic_args () {
# FAQ.
quiet_process () {
if [ $quiet -ge 1 ]; then
$@ 1>/dev/null
fi
if [ $quiet -ge 2 ]; then
$@ 2>/dev/null
"$@" 1>/dev/null
if [ $quiet -ge 2 ]; then
"$@" 2>/dev/null
fi
else
"$@"
fi
}

Expand Down Expand Up @@ -205,11 +207,7 @@ fi
# WARNING: You must pipe in the file because arguments are ignored if this is
# cat(1). (We also don't want a progress bar if stdin is not a terminal, but
# pv takes care of that.)
if [ "$quiet" -ge 1 ]; then
pv_ () {
: # noop if “--quiet”
}
elif command -v pv > /dev/null 2>&1; then
if command -v pv > /dev/null 2>&1 && [ "$quiet" -lt 1 ]; then
pv_ () {
pv -pteb "$@"
}
Expand Down

0 comments on commit e3b7c6c

Please sign in to comment.