From 1e65e5153bcf4656459dd1dcb31beece645dfe57 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 17 Sep 2010 10:30:46 +0200 Subject: [PATCH] sde: fixed to be more friendly to Ubuntu's /bin/sh --- bin/sde | 5 +++-- lib/sde-wrapper-command.in | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/sde b/bin/sde index 3081d3e..9153634 100755 --- a/bin/sde +++ b/bin/sde @@ -3,7 +3,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: bin/sde -# Copyright (C) 2006 - 2008 The OpenSDE Project +# Copyright (C) 2006 - 2010 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -29,8 +29,9 @@ echo_abort() { # Early checking of the system # -[ -n "$( type -p readlink )" ] || +if ! type readlink > /dev/null 2>&1; then echo_abort 1 '`readlink` tool not found' +fi readlink -f /bin/sh 2>&1 > /dev/null [ $? -eq 0 ] || diff --git a/lib/sde-wrapper-command.in b/lib/sde-wrapper-command.in index 298cf83..4f31d6a 100644 --- a/lib/sde-wrapper-command.in +++ b/lib/sde-wrapper-command.in @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: lib/sde-wrapper-command.in -# Copyright (C) 2006 - 2008 The OpenSDE Project +# Copyright (C) 2006 - 2010 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -28,9 +28,9 @@ sde_wrapper_command_help_list() { for command in $( sde_wrapper_command_list ); do name=$( sde_wrapper_name "$command" ) desc=$( sde_wrapper_desc "$command" ) - aliases=$( sde_wrapper_aliases "$command" ) + aliases=$( sde_wrapper_aliases "$command" | tr ' ' ',') - printf "%15s %s%s\n" "$name" "${desc:-...}" "${aliases:+ (Alias: ${aliases// /,})}" + printf "%15s %s%s\n" "$name" "${desc:-...}" "${aliases:+ (Alias: ${aliases})}" done }