From 2cca0470955143de63836df1902fa31090cdb771 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 20 Mar 2010 20:56:11 -0400 Subject: [PATCH] apt-zephyr: Make send_zephyr a function. Signed-off-by: Anders Kaseorg --- apt-zephyr/apt-zephyr | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apt-zephyr/apt-zephyr b/apt-zephyr/apt-zephyr index 54300bd..a8e50df 100755 --- a/apt-zephyr/apt-zephyr +++ b/apt-zephyr/apt-zephyr @@ -13,6 +13,18 @@ ZAUTH= # Read configuration . /etc/apt-zephyr.conf +send_zephyr () +{ + zwrite \ + ${CLASS:+-c "$CLASS"} \ + ${INSTANCE:+-i "$INSTANCE"} \ + ${REALM:+-r "$REALM"} \ + ${SIG:+-s "$SIG"} \ + ${OPCODE:+-O "$OPCODE"} \ + ${ZAUTH:--d} \ + ${RECIPIENTS:+$RECIPIENTS} +} + package () { package=$1 @@ -75,5 +87,4 @@ case "$line" in done rm -f "$oldpkgs" "$newpkgs" ;; -esac | \ - zwrite ${CLASS:+-c "$CLASS"} ${INSTANCE:+-i "$INSTANCE"} ${REALM:+-r "$REALM"} ${SIG:+-s "$SIG"} ${OPCODE:+-O "$OPCODE"} ${ZAUTH:--d} ${RECIPIENTS:+$RECIPIENTS} +esac | send_zephyr -- 2.45.0