From b4adb3dbcf434a00ffd3f80c234df1f93a29596e Mon Sep 17 00:00:00 2001 From: rathnor Date: Fri, 29 Nov 2002 13:39:37 +0000 Subject: [PATCH] compatibility fixes with old solaris sh --- util/fluxbox-generate_menu | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/util/fluxbox-generate_menu b/util/fluxbox-generate_menu index e90e1d5b..4a4f5823 100755 --- a/util/fluxbox-generate_menu +++ b/util/fluxbox-generate_menu @@ -22,9 +22,10 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # -# $Id: fluxbox-generate_menu,v 1.14 2002/11/19 11:31:31 fluxgen Exp $ +# $Id: fluxbox-generate_menu,v 1.15 2002/11/29 13:39:37 rathnor Exp $ -[ `id -u` -eq 0 ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin +WHOAMI=`whoami` +[ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin # Functions display_usage() { @@ -65,33 +66,31 @@ EOF } display_authors() { -WHOAMI=`whoami` cat < /dev/null` + if [ -x "$file" ]; then + if [ $# -gt 1 ]; then + shift + $* + fi + return 0 + else return 1 fi - which $1 > /dev/null 2> /dev/null - found=$? - if [ $found -eq 0 -a $# -gt 1 ]; then - shift - $* - fi - return $found } append() {