Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-04 09:55:51 +0200
committerErich Eckner <git@eckner.net>2018-05-04 09:55:51 +0200
commit54b0361f2a194a02c8da69d8122d4e9344a5a687 (patch)
treeeff63ce4beba1b64057ccd5aad62e160023fcaba /lib
parent567e716c8696754f4b3323f962a616e9be12115d (diff)
lib/common-functions: allow "copy"
Diffstat (limited to 'lib')
-rwxr-xr-xlib/common-functions9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 86b8aaa..b524ab6 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -921,8 +921,9 @@ extract_pkgname_epoch_pkgver_pkgrel_sub_pkgrel_arch_from_package_name() {
fi
}
-# irc_say $channel
+# irc_say $channel [copy]
# say content of stdin in irc channel $channel (default: #archlinux32)
+# and print copy to stdout if 'copy' is given
# shellcheck disable=SC2120
irc_say() {
@@ -933,6 +934,10 @@ irc_say() {
channel="$1"
fi
if [ -p "${irc_dir}/${channel}/in" ]; then
- sponge "${irc_dir}/${channel}/in"
+ if [ "$2" = 'copy' ]; then
+ pee cat 'sponge '"${irc_dir}/${channel}/in"
+ else
+ sponge "${irc_dir}/${channel}/in"
+ fi
fi
}