From: Konstantin Dmitriev Date: Wed, 7 Apr 2010 15:23:43 +0000 (+0700) Subject: Fix synfigstudio binary path detection in CPH monitor X-Git-Url: https://git.pterodactylus.net/?p=synfig.git;a=commitdiff_plain;h=5dc0776c46b4057e83a8414549b293a40028c04a Fix synfigstudio binary path detection in CPH monitor --- diff --git a/synfig-studio/synfigstudio-cph-monitor b/synfig-studio/synfigstudio-cph-monitor index 6dcc2bc..590d3c5 100755 --- a/synfig-studio/synfigstudio-cph-monitor +++ b/synfig-studio/synfigstudio-cph-monitor @@ -1,7 +1,8 @@ #!/bin/bash # Synfig Crash Monitor script -# Copyright (c) 2009 Konstantin Dmitriev +# Copyright (c) 2009-2010 Konstantin Dmitriev +# # This package is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of @@ -124,7 +125,7 @@ mainloop() STARTED=1 RUNTIME=0 #get version - P=$(ps --no-headers -f -Csynfigstudio |egrep "^`whoami`" | tr -s ' '| cut -d ' ' -f 8) + P=$(ps --no-headers -Csynfigstudio -o uid,cmd |egrep "^ *`id -u`" | egrep -v "" | tr -s ' ' | sed "s|^ *`id -u` *||" | sed "s|/bin/sh *||" | head -n 1) echo if [ ! -e $P ]; then P=`which $P`