[PC-BSD Commits] r3205 - pbibuild/modules/googleearth/overlay-dir
svn at pcbsd.org
svn at pcbsd.org
Thu Jan 8 12:39:58 PST 2009
Author: kris
Date: 2009-01-08 12:39:58 -0800 (Thu, 08 Jan 2009)
New Revision: 3205
Modified:
pbibuild/modules/googleearth/overlay-dir/PBI.RemoveScript.sh
Log:
Added question if user wants to remove google earth user profiles
Modified: pbibuild/modules/googleearth/overlay-dir/PBI.RemoveScript.sh
===================================================================
--- pbibuild/modules/googleearth/overlay-dir/PBI.RemoveScript.sh 2009-01-08 20:28:04 UTC (rev 3204)
+++ pbibuild/modules/googleearth/overlay-dir/PBI.RemoveScript.sh 2009-01-08 20:39:58 UTC (rev 3205)
@@ -7,4 +7,25 @@
# TIP: 'kdialog' should be used for user interaction.
#########################################
+if [ ! -z "$DISPLAY" ]
+then
+ # Ask if we want to remove the user profiles
+ kdialog --yesno "Do you want to remove all Google Earth user profiles?" --title "Remove user profiles"
+ if [ "$?" = "0" ]
+ then
+ # Get list of users
+ ULIST="`cut -d ':' -f 1 /etc/passwd | grep -v '^#'`"
+ for i in `${ULIST}`
+ do
+ # Find the homedir for this user
+ HOMEDIR="`cat /etc/passwd | grep ^${i}: | cut -d ":" -f 6`"
+ # Check if we have a mozilla firefox profile and remove it
+ if [ -e "${HOMEDIR}/.googleearth" ]
+ then
+ rm -rf ${HOMEDIR}/.googleearth
+ fi
+ done
+ fi
+fi
+
More information about the Commits
mailing list