chiark
/
gitweb
/
~webstump
/
modbot-mtm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Substitute the message number for [REFERENCE] in added-headers, if present
[modbot-mtm.git]
/
stump
/
bin
/
processApproved
diff --git
a/stump/bin/processApproved
b/stump/bin/processApproved
index 9cdf3c6cead81535f081f2449edd3ceb27112abb..a62333ecd60c78160bccb07f5c239c2ebe745ee3 100755
(executable)
--- a/
stump/bin/processApproved
+++ b/
stump/bin/processApproved
@@
-1,4
+1,7
@@
-#!/bin/sh
+#!/bin/bash
+
+set -ex
+set -o pipefail
NEWSBIN=/var/lib/newsbin; export NEWSBIN
shift
NEWSBIN=/var/lib/newsbin; export NEWSBIN
shift
@@
-28,7
+31,12
@@
post() {
(
echo Path: "$PATH_SUFFIX"
(
echo Path: "$PATH_SUFFIX"
- cat $MNG_ROOT/etc/added-headers | grep ': '
+ perl <$MNG_ROOT/etc/added-headers -ne '
+ next unless m/\:/;
+ s/\[REFERENCE\]/[$ENV{"WEBSTUMP_MESSAGENUM"}]/g
+ if defined $ENV{"WEBSTUMP_MESSAGENUM"};
+ print or die $!;
+ '
# I do grep above because a lot of users inserts empty
# lines in the added headers.
# I do grep above because a lot of users inserts empty
# lines in the added headers.