diff options
author | rathnor <rathnor> | 2002-11-29 13:39:37 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2002-11-29 13:39:37 (GMT) |
commit | b4adb3dbcf434a00ffd3f80c234df1f93a29596e (patch) | |
tree | 7c958df28ef3e8a0e6e311cb9491badbb4ebee7f /util | |
parent | 5cef8b6505b69c4c69446fec29666c42f57cf5e5 (diff) | |
download | fluxbox-b4adb3dbcf434a00ffd3f80c234df1f93a29596e.zip fluxbox-b4adb3dbcf434a00ffd3f80c234df1f93a29596e.tar.bz2 |
compatibility fixes with old solaris sh
Diffstat (limited to 'util')
-rwxr-xr-x | util/fluxbox-generate_menu | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/util/fluxbox-generate_menu b/util/fluxbox-generate_menu index e90e1d5..4a4f582 100755 --- a/util/fluxbox-generate_menu +++ b/util/fluxbox-generate_menu | |||
@@ -22,9 +22,10 @@ | |||
22 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | # DEALINGS IN THE SOFTWARE. | 23 | # DEALINGS IN THE SOFTWARE. |
24 | # | 24 | # |
25 | # $Id: fluxbox-generate_menu,v 1.14 2002/11/19 11:31:31 fluxgen Exp $ | 25 | # $Id: fluxbox-generate_menu,v 1.15 2002/11/29 13:39:37 rathnor Exp $ |
26 | 26 | ||
27 | [ `id -u` -eq 0 ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin | 27 | WHOAMI=`whoami` |
28 | [ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin | ||
28 | 29 | ||
29 | # Functions | 30 | # Functions |
30 | display_usage() { | 31 | display_usage() { |
@@ -65,33 +66,31 @@ EOF | |||
65 | } | 66 | } |
66 | 67 | ||
67 | display_authors() { | 68 | display_authors() { |
68 | WHOAMI=`whoami` | ||
69 | cat <<EOF | 69 | cat <<EOF |
70 | 70 | ||
71 | fluxbox-generate_menu was brought to you by: | 71 | fluxbox-generate_menu was brought to you by: |
72 | 72 | ||
73 | Henrik Kinnunen: Project leader. | 73 | Henrik Kinnunen: Project leader. |
74 | Han Boetes: Packaging, debugging and scripts. | 74 | Han Boetes: Packaging, debugging and scripts. |
75 | Jeramy B. Smith: Packaging assistance, gnome and kde menu system. | 75 | Jeramy B. Smith: Packaging assistance, gnome and kde menu system. |
76 | Xyrnix: Mysterious guest developer who made find_it module. | ||
77 | Filippo Pappalardo: Italian locales and -t option. | 76 | Filippo Pappalardo: Italian locales and -t option. |
77 | Simon Bowden: Cleanups and compatibility for sun. | ||
78 | $WHOAMI: Innocent bystander. | 78 | $WHOAMI: Innocent bystander. |
79 | 79 | ||
80 | EOF | 80 | EOF |
81 | } | 81 | } |
82 | 82 | ||
83 | find_it() { | 83 | find_it() { |
84 | if [ -z "$1" ]; then | 84 | file=`which $1 2> /dev/null` |
85 | # echo "Nothing found" | 85 | if [ -x "$file" ]; then |
86 | if [ $# -gt 1 ]; then | ||
87 | shift | ||
88 | $* | ||
89 | fi | ||
90 | return 0 | ||
91 | else | ||
86 | return 1 | 92 | return 1 |
87 | fi | 93 | fi |
88 | which $1 > /dev/null 2> /dev/null | ||
89 | found=$? | ||
90 | if [ $found -eq 0 -a $# -gt 1 ]; then | ||
91 | shift | ||
92 | $* | ||
93 | fi | ||
94 | return $found | ||
95 | } | 94 | } |
96 | 95 | ||
97 | append() { | 96 | append() { |