Small changes in wineshelllink

Francois Gouget fgouget at free.fr
Mon Sep 29 10:31:36 CDT 2003


I believe it is customary to return error code two in case of a usage
error. Also, using -z seems clearer.

Changelog:

 * tools/wineshelllink

   Return 2 in case of a usage error.
   Us -z instead of comparing to an empty string.

Index: tools/wineshelllink
===================================================================
RCS file: /home/cvs/wine/tools/wineshelllink,v
retrieving revision 1.15
diff -u -r1.15 wineshelllink
--- tools/wineshelllink	23 May 2002 16:31:22 -0000	1.15
+++ tools/wineshelllink	9 Feb 2003 08:21:24 -0000
@@ -45,7 +45,7 @@
   --descr xx    application description

 EOF
-    exit 1
+    exit 2
 }

 if [ $# -eq 0 ] ; then
@@ -67,13 +67,13 @@
   esac
 done

-if [ "$mode" = ""  ] ; then
-    echo Either --desktop or --menu required
+if [ -z "$mode" ] ; then
+    echo "Either --desktop or --menu required"
     usage
 fi

-if [ "$link" = ""  ] ; then
-    echo You must specify a link name with --link
+if [ -z "$link" ] ; then
+    echo "You must specify a link name with --link"
     usage
 fi




-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
           Demander si un ordinateur peut penser revient à demander
                          si un sous-marin peut nager.





More information about the wine-patches mailing list