[Nautilus-list] PATCH: nautilus-clean.sh update for Solaris



Hey hackers (and users, I didn't see any nautilus-hackers list),

I recently committed a patch from Sun Ireland's Louise Miller for
evolution's killev script, which does the same thing
nautilus-clean.sh, that lets killev work on Solaris.  Louise said the
Solaris equivalent of the killall command is pkill.

Considering Eazel's recent partnership with Sun, I figured I'd forward
a patch that fixes the same thing for nautilus-clean.sh.

Pretty simple, tell me if it's ok to commit or go ahead and add it to
one of your commits if it's a desired change.

Thanks,
Jason.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.3631
diff -u -r1.3631 ChangeLog
--- ChangeLog	2001/02/03 17:34:05	1.3631
+++ ChangeLog	2001/02/03 19:06:15
@@ -1,3 +1,7 @@
+2001-02-03  Jason Leach  <jasonleach usa net>
+
+	* nautilus-clean.sh: Update to work with Solaris.
+
 2001-02-03  John Sullivan  <sullivan eazel com>
 
 	Fixed bug 6254 ("Display" name for grouping in "Folder Views"
Index: nautilus-clean.sh
===================================================================
RCS file: /cvs/gnome/nautilus/nautilus-clean.sh,v
retrieving revision 1.32
diff -u -r1.32 nautilus-clean.sh
--- nautilus-clean.sh	2001/02/02 21:11:55	1.32
+++ nautilus-clean.sh	2001/02/03 19:06:15
@@ -107,6 +107,14 @@
 
 unset FOUND_ANY
 
+sysname=`uname -s`
+
+if [ "$sysname" = "SunOS" ]; then
+	killcmd="pkill"
+else
+	killcmd="killall"
+fi
+
 for NAME in $AUX_PROGS; do
     EGREP_PATTERN=`echo $NAME | sed -e 's/\(.\)\(.*\)/[\1]\2/' | sed -e 's/\[\\\^\]/\[\\^\]/'`
     COUNT=`ps auxww | egrep $EGREP_PATTERN | grep -v emacs | grep -v egrep | wc -l`
@@ -120,9 +128,9 @@
 
 	if [ "$quiet" != "yes" ]
 	then
-	    killall "$NAME"
+	    $killcmd "$NAME"
 	else
-	    killall "$NAME" > /dev/null 2>&1
+	    $killcmd "$NAME" > /dev/null 2>&1
 	fi
     fi
 done


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]