[32397] trunk/base/portmgr/dmg/preflight

jmpp at macports.org jmpp at macports.org
Fri Dec 28 21:29:40 PST 2007


Revision: 32397
          http://trac.macosforge.org/projects/macports/changeset/32397
Author:   jmpp at macports.org
Date:     2007-12-28 21:29:39 -0800 (Fri, 28 Dec 2007)

Log Message:
-----------

Some syntax tweaks:

 * we're using bash, to use echo's -e flag and remove useless echo calls for newline characters;
 * whitespace cleanups;
 * remove useless semicolons.

Modified Paths:
--------------
    trunk/base/portmgr/dmg/preflight

Modified: trunk/base/portmgr/dmg/preflight
===================================================================
--- trunk/base/portmgr/dmg/preflight	2007-12-29 05:17:25 UTC (rev 32396)
+++ trunk/base/portmgr/dmg/preflight	2007-12-29 05:29:39 UTC (rev 32397)
@@ -59,61 +59,61 @@
 
 [ ! -d /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports ] || {
     mkdir -vp /opt/local/var/macports/sources/rsync.macports.org/release && mv -v \
-        /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports /opt/local/var/macports/sources/rsync.macports.org/release/ports ;
+      /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports /opt/local/var/macports/sources/rsync.macports.org/release/ports
 }
 
-for receipt in /opt/local/var/macports/receipts/*/*/receipt.bz2 ; do
+for receipt in /opt/local/var/macports/receipts/*/*/receipt.bz2; do
     [ ! \( -f ${receipt} -a ! -f ${receipt}.mpsaved \) ] || { cp -v ${receipt} ${receipt}.mpsaved && {
-      bzip2 -q -dc ${receipt} | sed 's/db\/dports/macports/g' | bzip2 -q -zf > ${receipt}.new ;
-    } && mv -v ${receipt}.new ${receipt} ;
+        bzip2 -q -dc ${receipt} | sed 's/db\/dports/macports/g' | bzip2 -q -zf > ${receipt}.new
+    } && mv -v ${receipt}.new ${receipt}
 }; done
 
 [ ! \( -f /opt/local/etc/macports/ports.conf -a ! -f ${UPGRADECHECK} \) ] || {
-  mv -v /opt/local/etc/macports/ports.conf /opt/local/etc/macports/macports.conf.mpsaved
-  sed 's/etc\/ports/etc\/macports/g' /opt/local/etc/macports/macports.conf.mpsaved > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/db\/dports/macports/g' /opt/local/etc/macports/macports.conf > /opt/local/etc//macports/macports.conf.tmp && \
-    mv -v /opt/local/etc//macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/darwinports/macports/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/dpupdate1\/base/release\/base/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed '/^rsync_options/s/"\(.*\)"/\1/' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/ --delete / /' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
-  sed 's/ ports.conf(5)/ macports.conf(5)/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
-    mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    mv -v /opt/local/etc/macports/ports.conf /opt/local/etc/macports/macports.conf.mpsaved
+    sed 's/etc\/ports/etc\/macports/g' /opt/local/etc/macports/macports.conf.mpsaved > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/db\/dports/macports/g' /opt/local/etc/macports/macports.conf > /opt/local/etc//macports/macports.conf.tmp && \
+      mv -v /opt/local/etc//macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/darwinports/macports/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/dpupdate1\/base/release\/base/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed '/^rsync_options/s/"\(.*\)"/\1/' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/ --delete / /' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
+    sed 's/ ports.conf(5)/ macports.conf(5)/g' /opt/local/etc/macports/macports.conf > /opt/local/etc/macports/macports.conf.tmp && \
+      mv -v /opt/local/etc/macports/macports.conf.tmp /opt/local/etc/macports/macports.conf
 }
 
 [ ! \( -f /opt/local/etc/macports/sources.conf -a ! -f ${UPGRADECHECK} \) ] || {
-  cp -v /opt/local/etc/macports/sources.conf /opt/local/etc/macports/sources.conf.mpsaved
-  sed 's/darwinports/macports/g' /opt/local/etc/macports/sources.conf > /opt/local/etc/macports/sources.conf.tmp && \
-    mv -v /opt/local/etc/macports/sources.conf.tmp /opt/local/etc/macports/sources.conf
-  sed 's/dpupdate\/dports/release\/ports\//g' /opt/local/etc/macports/sources.conf > /opt/local/etc/macports/sources.conf.tmp && \
-    mv -v /opt/local/etc/macports/sources.conf.tmp /opt/local/etc/macports/sources.conf
+    cp -v /opt/local/etc/macports/sources.conf /opt/local/etc/macports/sources.conf.mpsaved
+    sed 's/darwinports/macports/g' /opt/local/etc/macports/sources.conf > /opt/local/etc/macports/sources.conf.tmp && \
+      mv -v /opt/local/etc/macports/sources.conf.tmp /opt/local/etc/macports/sources.conf
+    sed 's/dpupdate\/dports/release\/ports\//g' /opt/local/etc/macports/sources.conf > /opt/local/etc/macports/sources.conf.tmp && \
+      mv -v /opt/local/etc/macports/sources.conf.tmp /opt/local/etc/macports/sources.conf
 }
 
 [ ! \( -f "${HOME}/.macports/ports.conf" -a ! -f ${UPGRADECHECK} \) ] || {
-  mv -v "${HOME}/.macports/ports.conf" "${HOME}/.macports/macports.conf.mpsaved"
-  sed 's/etc\/ports/etc\/macports/g' "${HOME}/.macports/macports.conf.mpsaved" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/db\/dports/macports/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/darwinports/macports/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/dpupdate1\/base/release\/base/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed '/^rsync_options/s/"\(.*\)"/\1/' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/ --delete / /' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
-  sed 's/ ports.conf(5)/ macports.conf(5)/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
-    mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    mv -v "${HOME}/.macports/ports.conf" "${HOME}/.macports/macports.conf.mpsaved"
+    sed 's/etc\/ports/etc\/macports/g' "${HOME}/.macports/macports.conf.mpsaved" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/db\/dports/macports/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/darwinports/macports/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/dpupdate1\/base/release\/base/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/dpupdate\/base\/\{0,1\}/trunk\/base\//g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed '/^rsync_options/s/"\(.*\)"/\1/' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/ --delete / /' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
+    sed 's/ ports.conf(5)/ macports.conf(5)/g' "${HOME}/.macports/macports.conf" > "${HOME}/.macports/macports.conf.tmp" && \
+      mv -v "${HOME}/.macports/macports.conf.tmp" "${HOME}/.macports/macports.conf"
 }
 
 
@@ -121,6 +121,6 @@
 
 
 [ -f ${UPGRADECHECK} ] || {
-    echo ""; echo "MacPorts installation successfully upgraded from the old DarwinPorts namespace!"; echo ""
-	echo "MacPorts rename update done!" > ${UPGRADECHECK} ;
+    echo -e "\nMacPorts installation successfully upgraded from the old DarwinPorts namespace!\n"
+    echo "MacPorts rename update done!" > ${UPGRADECHECK}
 }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071228/a3ce015e/attachment-0001.html


More information about the macports-changes mailing list