iankelling.org
/
git
/
log-quiet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify for shellcheck
[log-quiet]
/
logq-function
diff --git
a/logq-function
b/logq-function
index a18319f680a598d63df02db2c435d22a18b2487b..410e683beb9b6ac360725c1c208ba4e4ac6c6297 100644
(file)
--- a/
logq-function
+++ b/
logq-function
@@
-53,16
+53,13
@@
$help"
printf "%s\n%s\n\n" "Log of $prettycommand" "$(date)" >"$file"
if [[ $- != *x* ]]; then
printf "%s\n%s\n\n" "Log of $prettycommand" "$(date)" >"$file"
if [[ $- != *x* ]]; then
- echo "log $file = $
@
"
+ echo "log $file = $
*
"
fi
# we will propagate any errors
fi
# we will propagate any errors
- local logq_ret=$(
- set +e
- trap ERR
- "$@" &>> "$file"
- echo $?
- )
+ local logq_ret
+ logq_ret=0
+ "$@" &>> "$file" || logq_ret=$?
printf "\n%s\n%s\n" "$(date)" "----------------" >> "$file"
if [[ $logq_ret != 0 ]]; then
printf "\n%s\n%s\n" "$(date)" "----------------" >> "$file"
if [[ $logq_ret != 0 ]]; then