[PC-BSD Commits] r3689 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts

svn at pcbsd.org svn at pcbsd.org
Mon Mar 30 06:44:24 PST 2009


Author: kris
Date: 2009-03-30 07:44:24 -0700 (Mon, 30 Mar 2009)
New Revision: 3689

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.PostUpgrade.sh
Log:

Change how we do the upgrades, don't remove users kde settings, just replace all references from /usr/local to /PCBSD/local, which should let the config files still work



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.PostUpgrade.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.PostUpgrade.sh	2009-03-29 03:52:30 UTC (rev 3688)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.PostUpgrade.sh	2009-03-30 14:44:24 UTC (rev 3689)
@@ -17,9 +17,21 @@
 
  if [ -d "${FSMNT}/${HOMEDIR}/.kde4/share/config" ]
  then
-    # Remove .kde4 config files
-    rm -rf ${FSMNT}/${HOMEDIR}/.kde4/share/config
-    mkdir ${FSMNT}/${HOMEDIR}/.kde4/share/config
+    # Cleanup .kde4 config files with old /usr/local entries
+    cd ${FSMNT}/${HOMEDIR}/.kde4/share/config
+    for f in `ls`
+    do
+      if [ -f "${f}" ]
+      then
+        grep "/usr/local" ${f} >/dev/null 2>/dev/null
+        if [ "$?" = "0" ]
+        then
+          sed -e "s|/usr/local|/PCBSD/local|g" ${f} >${f}.tmp
+          mv ${f}.tmp ${f}
+        fi
+      fi
+    done
+
     # Copy over the new template files
     cp ${FSMNT}/usr/share/skel/.kde4/share/config/dolphinrc ${FSMNT}/${HOMEDIR}/.kde4/share/config/
     cp ${FSMNT}/usr/share/skel/.kde4/share/config/gtk* ${FSMNT}/${HOMEDIR}/.kde4/share/config/



More information about the Commits mailing list