iankelling.org
/
git
/
log-quiet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stop returning 1. use pipefail if needed
[log-quiet]
/
log-once
diff --git
a/log-once
b/log-once
index 040e2ba72d634a76c3363cc855d3997fd9f72967..179dacfd8c670eea5035a2c6255d7a9e60a727c5 100755
(executable)
--- a/
log-once
+++ b/
log-once
@@
-40,7
+40,7
@@
state in the same directory.
echo "$help"
return
elif [[ $1 == -[0-9]* ]]; then
echo "$help"
return
elif [[ $1 == -[0-9]* ]]; then
- errors=
{$
1#-}
+ errors=
${
1#-}
shift
elif [[ $1 == -- ]]; then
shift
shift
elif [[ $1 == -- ]]; then
shift
@@
-65,11
+65,11
@@
state in the same directory.
done
fi
glob="$c[0-9]*"
done
fi
glob="$c[0-9]*"
- file=($glob);
file="${file[0]}"; [[ $glob != $file
]] || file=
+ file=($glob);
[[ $file != "$glob"
]] || file=
if $log; then
out=append
if [[ $file ]]; then
if $log; then
out=append
if [[ $file ]]; then
- i=
${file#$c}
+ i=
"${file#$c}"
if (( i < errors )); then
new_file=$c$((i+1))
mv $file $new_file
if (( i < errors )); then
new_file=$c$((i+1))
mv $file $new_file
@@
-88,7
+88,7
@@
state in the same directory.
$out $file <<<"${output[@]}"
$out $file
fi
$out $file <<<"${output[@]}"
$out $file
fi
- return
1
+ return
0
fi
if [[ $file ]]; then
rm -f $file
fi
if [[ $file ]]; then
rm -f $file