[csw-devel] SF.net SVN: gar:[11703] csw/mgar/pkg/bash/trunk
chninkel at users.sourceforge.net
chninkel at users.sourceforge.net
Tue Nov 23 21:28:35 CET 2010
Revision: 11703
http://gar.svn.sourceforge.net/gar/?rev=11703&view=rev
Author: chninkel
Date: 2010-11-23 20:28:34 +0000 (Tue, 23 Nov 2010)
Log Message:
-----------
bash: added /opt/csw/bin in bashbug hardcoded paths for autoselecting EDITOR variable
Modified Paths:
--------------
csw/mgar/pkg/bash/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/bash/trunk/files/0001-bashbug-editor-path.patch
Modified: csw/mgar/pkg/bash/trunk/Makefile
===================================================================
--- csw/mgar/pkg/bash/trunk/Makefile 2010-11-23 16:57:22 UTC (rev 11702)
+++ csw/mgar/pkg/bash/trunk/Makefile 2010-11-23 20:28:34 UTC (rev 11703)
@@ -66,6 +66,9 @@
# opencsw bash use /etc/bash.bashrc and /etc/bash.bash_logout files
PATCHFILES += use_system_bashrc_and_logout.patch
+# add /opt/csw/bin in the hardcoded paths used for auto-selecting the EDITOR variable
+PATCHFILES += 0001-bashbug-editor-path.patch
+
LICENSE = COPYING
# we add CSW bash to the /etc/shells files using the build script
Added: csw/mgar/pkg/bash/trunk/files/0001-bashbug-editor-path.patch
===================================================================
--- csw/mgar/pkg/bash/trunk/files/0001-bashbug-editor-path.patch (rev 0)
+++ csw/mgar/pkg/bash/trunk/files/0001-bashbug-editor-path.patch 2010-11-23 20:28:34 UTC (rev 11703)
@@ -0,0 +1,58 @@
+From 620ec77ec8e909bd492005b29762038668e3d77f Mon Sep 17 00:00:00 2001
+From: Yann Rouillard <yann at pleiades.fr.eu.org>
+Date: Tue, 23 Nov 2010 21:21:40 +0100
+Subject: [PATCH] add /opt/csw/bin in the hardcoded paths used for auto-selecting the EDITOR variable.
+
+---
+ support/bashbug.sh | 28 ++++++++--------------------
+ 1 files changed, 8 insertions(+), 20 deletions(-)
+
+diff --git a/support/bashbug.sh b/support/bashbug.sh
+index 7b36d40..6dfd9bb 100644
+--- a/support/bashbug.sh
++++ b/support/bashbug.sh
+@@ -35,7 +35,7 @@ PATCHLEVEL="!PATCHLEVEL!"
+ RELSTATUS="!RELSTATUS!"
+ MACHTYPE="!MACHTYPE!"
+
+-PATH=/bin:/usr/bin:/usr/local/bin:$PATH
++PATH=/opt/csw/bin:/bin:/usr/bin:/usr/local/bin:$PATH
+ export PATH
+
+ # Check if TMPDIR is set, default to /tmp
+@@ -120,25 +120,13 @@ esac
+ BUGADDR="${1-$BUGBASH}"
+
+ if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; 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
+- elif [ -x /usr/contrib/bin/emacs ]; then
+- DEFEDITOR=emacs
+- elif [ -x /usr/bin/emacs ]; then
+- DEFEDITOR=emacs
+- elif [ -x /usr/bin/xemacs ]; then
+- DEFEDITOR=xemacs
+- elif [ -x /usr/contrib/bin/jove ]; then
+- DEFEDITOR=jove
+- elif [ -x /usr/local/bin/jove ]; then
+- DEFEDITOR=jove
+- elif [ -x /usr/bin/vi ]; then
+- DEFEDITOR=vi
+- else
++ for E in editor ce emacs xemacs jove vi; do
++ if [ -x /opt/csw/bin/$E ] || [ -x /usr/bin/$E ] || [ -x /usr/local/bin/$E ] || [ -x /usr/contrib/bin/$E ]; then
++ DEFEDITOR=$E
++ break
++ fi
++ done
++ if [ -z "$DEFEDITOR" ]; then
+ echo "$0: No default editor found: attempting to use vi" >&2
+ DEFEDITOR=vi
+ fi
+--
+1.7.3
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list