From cfd1472cef4c0624d739b85fe5e1d04adab5d761 Mon Sep 17 00:00:00 2001
From: Dima Dorfman
Date: Mon, 18 Jun 2001 21:57:24 +0000
Subject: [PATCH] When processing -a, strip off the path of the argument before
copying it to the output.
Reviewed by: alex
---
gnu/usr.bin/send-pr/send-pr.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gnu/usr.bin/send-pr/send-pr.sh b/gnu/usr.bin/send-pr/send-pr.sh
index 8518b586e34..60784e3b516 100644
--- a/gnu/usr.bin/send-pr/send-pr.sh
+++ b/gnu/usr.bin/send-pr/send-pr.sh
@@ -169,15 +169,16 @@ while [ $# -gt 0 ]; do
echo "$USAGE" ; exit 1;
fi
if [ -e "$2" -a ! -d "$2" ]; then
+ PRETTY_NAME=`basename $2`
if file $2 | grep "text" >/dev/null 2>/dev/null ; then
ATTACHED_FILES="$ATTACHED_FILES
---- $2 begins here ---
+--- $PRETTY_NAME begins here ---
`cat \"$2\"`
---- $2 ends here ---
+--- $PRETTY_NAME ends here ---
"
else
ATTACHED_FILES="$ATTACHED_FILES
-`uuencode \"$2\" < \"$2\"`
+`uuencode \"$PRETTY_NAME\" < \"$2\"`
"
fi
shift;