FreeBSD Bugzilla – Attachment 7517 Details for
Bug 16275
approve send-pr(1) (attach files, use enviroment vars)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
send-pr.diff
send-pr.diff (text/plain), 4.03 KB, created by
Alexander Langer
on 2000-01-21 20:10:01 UTC
(
hide
)
Description:
send-pr.diff
Filename:
MIME Type:
Creator:
Alexander Langer
Created:
2000-01-21 20:10:01 UTC
Size:
4.03 KB
patch
obsolete
>--- send-pr-freebsd.old Fri Jan 21 20:13:08 2000 >+++ send-pr Fri Jan 21 20:55:01 2000 >@@ -87,19 +87,23 @@ > REPLY_TO="${REPLY_TO:-${REPLYTO:-$LOGNAME}}" > > # Find out the name of the originator of this PR. >-if [ -n "$NAME" ]; then >- ORIGINATOR="$NAME" >-elif [ -f $HOME/.fullname ]; then >- ORIGINATOR="`sed -e '1q' $HOME/.fullname`" >-elif [ -f /bin/domainname ]; then >- if [ "`/bin/domainname`" != "" -a -f /usr/bin/ypcat ]; then >- # Must use temp file due to incompatibilities in quoting behavior >- # and to protect shell metacharacters in the expansion of $LOGNAME >- /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" | >- cut -f5 -d':' | sed -e 's/,.*//' > $TEMP >- ORIGINATOR="`cat $TEMP`" >- rm -f $TEMP >+if [ -z "$PR_ORIGINATOR" ]; then >+ if [ -n "$NAME" ]; then >+ ORIGINATOR="$NAME" >+ elif [ -f $HOME/.fullname ]; then >+ ORIGINATOR="`sed -e '1q' $HOME/.fullname`" >+ elif [ -f /bin/domainname ]; then >+ if [ "`/bin/domainname`" != "" -a -f /usr/bin/ypcat ]; then >+ # Must use temp file due to incompatibilities in quoting behavior >+ # and to protect shell metacharacters in the expansion of $LOGNAME >+ /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" | >+ cut -f5 -d':' | sed -e 's/,.*//' > $TEMP >+ ORIGINATOR="`cat $TEMP`" >+ rm -f $TEMP >+ fi > fi >+else >+ ORIGINATOR="$PR_ORIGINATOR" > fi > > if [ "$ORIGINATOR" = "" ]; then >@@ -108,16 +112,20 @@ > rm -f $TEMP > fi > >-if [ -n "$ORGANIZATION" ]; then >- if [ -f "$ORGANIZATION" ]; then >- ORGANIZATION="`cat $ORGANIZATION`" >+if [ -z "$PR_ORGANIZATION" ]; then >+ if [ -n "$ORGANIZATION" ]; then >+ if [ -f "$ORGANIZATION" ]; then >+ ORGANIZATION="`cat $ORGANIZATION`" >+ fi >+ else >+ if [ -n "$DEFAULT_ORGANIZATION" ]; then >+ ORGANIZATION="$DEFAULT_ORGANIZATION" >+ elif [ -f $HOME/.organization ]; then >+ ORGANIZATION="`cat $HOME/.organization`" >+ fi > fi > else >- if [ -n "$DEFAULT_ORGANIZATION" ]; then >- ORGANIZATION="$DEFAULT_ORGANIZATION" >- elif [ -f $HOME/.organization ]; then >- ORGANIZATION="`cat $HOME/.organization`" >- fi >+ $ORGANIZATION="$PR_ORGANIZATION" > fi > > # If they don't have a preferred editor set, then use >@@ -139,7 +147,7 @@ > > COMMAND=`echo $0 | sed -e 's,.*/,,'` > USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [--request-id] >-[--version]" >+[--version] [-a file]" > REMOVE= > BATCH= > >@@ -162,6 +170,24 @@ > -L | --list) FORMAT=norm ;; > -l | -CL | --lisp) FORMAT=lisp ;; > --request-id) REQUEST_ID=true ;; >+ -a | --attach) if [ -z "$2" ]; then >+ echo "$USAGE" ; exit 1; >+ fi >+ if [ ! -d "$2" ]; then >+ if file $2 | grep "text" >/dev/null 2>/dev/null ; then >+ ATTACHED_FILES="$ATTACHED_FILES >+--- $2 begins here --- >+`cat \"$2\"` >+--- $2 ends here --- >+" >+ else >+ ATTACHED_FILES="$ATTACHED_FILES >+`uuencode \"$2\" < \"$2\"` >+" >+ fi >+ shift; >+ fi; >+ ;; > -h | --help) echo "$USAGE"; exit 0 ;; > -V | --version) echo "$VERSION"; exit 0 ;; > -*) echo "$USAGE" ; exit 1 ;; >@@ -318,7 +344,6 @@ > END { printf "\nSEND-PR:\n"; }' >> $file > > >- > cat >> $file << __EOF__ > To: $GNATS_ADDR > Subject: >@@ -330,28 +355,29 @@ > >Submitter-Id: $SUBMITTER > >Originator: $ORIGINATOR > >Organization: ${ORGANIZATION-$ORGANIZATION_C} >->Confidential: $CONFIDENTIAL_C >->Synopsis: $SYNOPSIS_C >->Severity: $SEVERITY_C >->Priority: $PRIORITY_C >->Category: $CATEGORY_C >+>Confidential: ${PR_CONFIDENTAL-$CONFIDENTIAL_C} >+>Synopsis: ${PR_SYNOPSIS-$SYNOPSIS_C} >+>Severity: ${PR_SEVERITY-$SEVERITY_C} >+>Priority: ${PR_PRIORITY-$PRIORITY_C} >+>Category: ${PR_CATEGORY-$CATEGORY_C} > >Release: ${DEFAULT_RELEASE-$RELEASE_C} > >Class: $CLASS_C > >Environment: > >- $ENVIRONMENT_C >+${PR_ENVIROMENT- $ENVIRONMENT_C} > > >Description: > >- $DESCRIPTION_C >+${PR_DESCRIPTION- $DESCRIPTION_C} > > >How-To-Repeat: > >- $HOW_TO_REPEAT_C >+${PR_HOW_TO_REPEAT- $HOW_TO_REPEAT_C} > > >Fix: > >- $FIX_C >+${PR_FIX- $FIX_C} >+$ATTACHED_FILES > > __EOF__
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 16275
: 7517