[66850] trunk/dports/kde/kmymoney

ryandesign at macports.org ryandesign at macports.org
Fri Apr 23 15:16:20 PDT 2010


Revision: 66850
          http://trac.macports.org/changeset/66850
Author:   ryandesign at macports.org
Date:     2010-04-23 15:16:17 -0700 (Fri, 23 Apr 2010)
Log Message:
-----------
kmymoney: fix starter app when not all directories exist; see #24618

Modified Paths:
--------------
    trunk/dports/kde/kmymoney/Portfile
    trunk/dports/kde/kmymoney/files/KMyMoney.applescript

Modified: trunk/dports/kde/kmymoney/Portfile
===================================================================
--- trunk/dports/kde/kmymoney/Portfile	2010-04-23 21:49:55 UTC (rev 66849)
+++ trunk/dports/kde/kmymoney/Portfile	2010-04-23 22:16:17 UTC (rev 66850)
@@ -4,7 +4,7 @@
 
 name              kmymoney
 version           1.0.4
-revision          5
+revision          6
 
 categories        kde finance
 maintainers       techno.ms:mk-macports pixilla.com:brad

Modified: trunk/dports/kde/kmymoney/files/KMyMoney.applescript
===================================================================
--- trunk/dports/kde/kmymoney/files/KMyMoney.applescript	2010-04-23 21:49:55 UTC (rev 66849)
+++ trunk/dports/kde/kmymoney/files/KMyMoney.applescript	2010-04-23 22:16:17 UTC (rev 66850)
@@ -48,14 +48,19 @@
 set command to ""
 
 set kdedirID to ""
+set qtdirID to ""
 set ICEauthorityID to ""
 set XauthorityID to ""
 
 set kdeDir to (POSIX path of (path to home folder) & ".kde/" as string)
+set qtDir to (POSIX path of (path to home folder) & ".qt/" as string)
 set ICEauthority to (POSIX path of (path to home folder) & ".ICEauthority" as string)
 set Xauthority to (POSIX path of (path to home folder) & ".Xauthority" as string)
 
 set kdeDirMessage to ""
+set qtDirMessage to ""
+set ICEauthorityMessage to ""
+set XauthorityMessage to ""
 
 try
 	
@@ -66,6 +71,12 @@
 
 try
 	
+	POSIX file qtDir as alias
+	set qtdirID to do shell script "stat -f '%Su' $HOME/.qt"
+	
+end try
+
+try
 	POSIX file ICEauthority as alias
 	set ICEauthorityID to do shell script "stat -f '%Su' $HOME/.ICEauthority"
 	
@@ -75,25 +86,30 @@
 	
 	POSIX file Xauthority as alias
 	set XauthorityID to do shell script "stat -f '%Su' $HOME/.Xauthority"
-	
+
 end try
 
-if ((not kdedirID is equal to "") and not kdedirID = userID) or not ICEauthorityID = userID or not XauthorityID = userID then
+if ((not kdedirID is equal to "") and not kdedirID = userID) or ((not qtdirID is equal to "") and not qtdirID = userID) or ((not ICEauthorityID is equal to "") and not ICEauthorityID = userID) or ((not XauthorityID is equal to "") and not XauthorityID = userID) then
 	
 	if (not kdedirID is equal to "") then set kdeDirMessage to (kdeDir & return & " is owned by " & kdedirID & return & return)
+	if (not qtdirID is equal to "") then set qtDirMessage to (qtDir & return & " is owned by " & qtdirID & return & return)
+	if (not ICEauthorityID is equal to "") then set ICEauthorityMessage to (ICEauthority & return & " is owned by " & ICEauthorityID & return & return)
+	if (not XauthorityID is equal to "") then set XauthorityMessage to (Xauthority & return & " is owned by " & XauthorityID & return & return)
 	
-	set fixPermissions to button returned of (display dialog (kdeDirMessage & ICEauthority & return & " is owned by " & ICEauthorityID & return & return & Xauthority & return & " is owned by " & XauthorityID & return & return & "They should be owned by " & userID & " for KMyMoney to run properly!") buttons {"Cancel", "Fix"} default button {"Fix"} with icon 2)
+	set fixPermissions to button returned of (display dialog (kdeDirMessage & qtDirMessage & ICEauthorityMessage & XauthorityMessage & "They should be owned by " & userID & " for KMyMoney to run properly!") buttons {"Cancel", "Fix"} default button {"Fix"} with icon 2)
 	
 	if fixPermissions = "Fix" then
 		
 		if (not kdedirID is equal to "") then do shell script "chown -R " & userID & " " & kdeDir with administrator privileges
-		do shell script "chown " & userID & " " & ICEauthority with administrator privileges
-		do shell script "chown " & userID & " " & Xauthority with administrator privileges
+		if (not qtdirID is equal to "") then do shell script "chown -R " & userID & " " & qtDir with administrator privileges
+		if (not ICEauthorityID is equal to "") then do shell script "chown " & userID & " " & ICEauthority with administrator privileges
+		if (not XauthorityID is equal to "") then do shell script "chown " & userID & " " & Xauthority with administrator privileges
 		
 	end if
 	
 end if
 
+
 set command to "sh -l -c " & (POSIX path of kmymoney) & " > /dev/null 2>&1"
 
 try
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100423/9b6f3643/attachment-0001.html>


More information about the macports-changes mailing list