diff options
author | Jari Aalto <jari.aalto@cante.net> | 2001-04-06 19:14:31 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:53 +0000 |
commit | 28ef6c316f1aff914bb95ac09787a3c83c1815fd (patch) | |
tree | 2812fe7ffc9beec4f99856906ddfcafda54cf16a /support/bashbug.sh | |
parent | bb70624e964126b7ac4ff085ba163a9c35ffa18f (diff) | |
download | android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.gz android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.tar.bz2 android_external_bash-28ef6c316f1aff914bb95ac09787a3c83c1815fd.zip |
Imported from ../bash-2.05.tar.gz.
Diffstat (limited to 'support/bashbug.sh')
-rw-r--r-- | support/bashbug.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/support/bashbug.sh b/support/bashbug.sh index cab105d..1064cb4 100644 --- a/support/bashbug.sh +++ b/support/bashbug.sh @@ -21,7 +21,17 @@ MACHTYPE="!MACHTYPE!" PATH=/bin:/usr/bin:/usr/local/bin:$PATH export PATH +# If the OS supplies a program to make temp files with semi-random names, +# use it. TEMP=/tmp/bbug.$$ +for d in /bin /usr/bin /usr/local/bin ; do + if [ -x $d/mktemp ]; then + TEMP=`$d/mktemp -t bbug ` ; break; + elif [ -x $d/tempfile ]; then + TEMP=` $d/tempfile --prefix bbug --mode 600 `; break + fi +done + USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]" VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}" @@ -91,7 +101,9 @@ esac BUGADDR="${1-$BUGBASH}" if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then - if [ -x /usr/local/bin/ce ]; then + if [ -x /usr/bin/editor ]; then + DEFEDITOR=editor + elif [ -x /usr/local/bin/ce ]; then DEFEDITOR=ce elif [ -x /usr/local/bin/emacs ]; then DEFEDITOR=emacs |