summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/send-pr
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-06-18 21:57:24 +0000
committerdd <dd@FreeBSD.org>2001-06-18 21:57:24 +0000
commitce724d80ee3964d73ffcc96448b062a8030c480a (patch)
treeb5441cff844ff9a5e15384ae1acca77a65b38c19 /gnu/usr.bin/send-pr
parent1a5baf9945a2d57e825b9b358d3d94286fbe6b32 (diff)
downloadFreeBSD-src-ce724d80ee3964d73ffcc96448b062a8030c480a.zip
FreeBSD-src-ce724d80ee3964d73ffcc96448b062a8030c480a.tar.gz
When processing -a, strip off the path of the argument before copying
it to the output. Reviewed by: alex
Diffstat (limited to 'gnu/usr.bin/send-pr')
-rw-r--r--gnu/usr.bin/send-pr/send-pr.sh7
1 files 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 8518b58..60784e3 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;
OpenPOWER on IntegriCloud