all repos — fluxbox @ b4adb3dbcf434a00ffd3f80c234df1f93a29596e

custom fork of the fluxbox windowmanager

compatibility fixes with old solaris sh
rathnor rathnor
commit

b4adb3dbcf434a00ffd3f80c234df1f93a29596e

parent

5cef8b6505b69c4c69446fec29666c42f57cf5e5

1 files changed, 13 insertions(+), 14 deletions(-)

jump to
M util/fluxbox-generate_menuutil/fluxbox-generate_menu

@@ -22,9 +22,10 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

# 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 <<EOF fluxbox-generate_menu was brought to you by: - Henrik Kinnunen: Project leader. + Henrik Kinnunen: Project leader. Han Boetes: Packaging, debugging and scripts. Jeramy B. Smith: Packaging assistance, gnome and kde menu system. - Xyrnix: Mysterious guest developer who made find_it module. Filippo Pappalardo: Italian locales and -t option. + Simon Bowden: Cleanups and compatibility for sun. $WHOAMI: Innocent bystander. EOF } find_it() { - if [ -z "$1" ]; then - # echo "Nothing found" + file=`which $1 2> /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() {