iankelling.org
/
git
/
log-quiet
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc712f2
)
bug fix: prints dry statement when not in dry run
author
Ian Kelling
<iank@fsf.org>
Mon, 11 Mar 2024 00:21:28 +0000
(20:21 -0400)
committer
Ian Kelling
<iank@fsf.org>
Mon, 11 Mar 2024 00:21:28 +0000
(20:21 -0400)
sysd-mail-once
patch
|
blob
|
history
diff --git
a/sysd-mail-once
b/sysd-mail-once
index c5cd8c84670c257448e19e6ec9b73b58f6a1c8f3..659fa92633860892a18a4b430ed1c027a3197cbb 100755
(executable)
--- a/
sysd-mail-once
+++ b/
sysd-mail-once
@@
-96,18
+96,18
@@
mi() {
fi
}
e() {
- printf "dryrun: %s\n" "$*"
+ if $dryrun; then
+ printf "dryrun: %s\n" "$*"
+ fi
}
c=$cbase/$service # c for command file path base
-if $dryrun; then
- e "c=$c"
-fi
+e "c=$c"
glob="${c}[0-9]*"
arr=($glob); file="${arr[0]}"; [[ $glob != "$file" ]] || file=
-if [[ $
dryrun && $
file ]]; then
+if [[ $file ]]; then
e "file=$file"
fi