When processing -a, strip off the path of the argument before copying
it to the output. Reviewed by: alex
This commit is contained in:
parent
ba1223a0db
commit
f766a057fa
@ -169,15 +169,16 @@ while [ $# -gt 0 ]; do
|
|||||||
echo "$USAGE" ; exit 1;
|
echo "$USAGE" ; exit 1;
|
||||||
fi
|
fi
|
||||||
if [ -e "$2" -a ! -d "$2" ]; then
|
if [ -e "$2" -a ! -d "$2" ]; then
|
||||||
|
PRETTY_NAME=`basename $2`
|
||||||
if file $2 | grep "text" >/dev/null 2>/dev/null ; then
|
if file $2 | grep "text" >/dev/null 2>/dev/null ; then
|
||||||
ATTACHED_FILES="$ATTACHED_FILES
|
ATTACHED_FILES="$ATTACHED_FILES
|
||||||
--- $2 begins here ---
|
--- $PRETTY_NAME begins here ---
|
||||||
`cat \"$2\"`
|
`cat \"$2\"`
|
||||||
--- $2 ends here ---
|
--- $PRETTY_NAME ends here ---
|
||||||
"
|
"
|
||||||
else
|
else
|
||||||
ATTACHED_FILES="$ATTACHED_FILES
|
ATTACHED_FILES="$ATTACHED_FILES
|
||||||
`uuencode \"$2\" < \"$2\"`
|
`uuencode \"$PRETTY_NAME\" < \"$2\"`
|
||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
shift;
|
shift;
|
||||||
|
Loading…
Reference in New Issue
Block a user