[55269] branches/release_1_8

jmr at macports.org jmr at macports.org
Fri Aug 7 17:23:13 PDT 2009


Revision: 55269
          http://trac.macports.org/changeset/55269
Author:   jmr at macports.org
Date:     2009-08-07 17:23:13 -0700 (Fri, 07 Aug 2009)
Log Message:
-----------
merge r55268 from trunk:
 postflight script: avoid replacing existing config files, update version number

Modified Paths:
--------------
    branches/release_1_8/base/portmgr/dmg/postflight

Property Changed:
----------------
    branches/release_1_8/
    branches/release_1_8/base/


Property changes on: branches/release_1_8
___________________________________________________________________
Added: svn:mergeinfo
   + /trunk:55268


Property changes on: branches/release_1_8/base
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
   + /branches/gsoc08-privileges/base:37343-46937
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:55268
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692

Modified: branches/release_1_8/base/portmgr/dmg/postflight
===================================================================
--- branches/release_1_8/base/portmgr/dmg/postflight	2009-08-08 00:20:20 UTC (rev 55268)
+++ branches/release_1_8/base/portmgr/dmg/postflight	2009-08-08 00:23:13 UTC (rev 55269)
@@ -35,12 +35,13 @@
 #set -x
 
 # Script identification ('cause more often than not the svn Id is not expanded):
-VERSION=1.7.0
+VERSION=1.8.0
 
 # Abstraction variables:
 PREFIX=/opt/local
 BINPATH=${PREFIX}/bin
 SBINPATH=${PREFIX}/sbin
+CONFIGPATH=${PREFIX}/etc/macports
 MANPAGES=${PREFIX}/share/man
 TCLSH=/usr/bin/tclsh
 TCL_PACKAGE_DIR=/Library/Tcl
@@ -48,6 +49,14 @@
 BACKUP_SUFFIX=macports-saved_${TIMESTAMP}
 OUR_STRING="MacPorts Installer addition on ${TIMESTAMP}"
 
+# Create config files from defaults if not present
+function setup_configs {
+    for f in macports.conf sources.conf variants.conf ; do
+        if [ ! -f ${CONFIGPATH}/${f} ]; then
+            /bin/cp ${CONFIGPATH}/${f}.default ${CONFIGPATH}/${f}
+        fi
+    done
+}
 
 # Command to update the MacPorts installation through "selfupdate":
 function update_macports {
@@ -100,6 +109,9 @@
 
 echo "The MacPorts Project, postflight script version ${VERSION}: checking the shell environment for user \"${USER}\"."
 
+# Set up config files
+setup_configs
+
 # Remove old stuff
 cleanup_man
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090807/9f99dd42/attachment.html>


More information about the macports-changes mailing list