[44651] contrib/select/select.sh

raimue at macports.org raimue at macports.org
Thu Jan 1 13:25:48 PST 2009


Revision: 44651
          http://trac.macports.org/changeset/44651
Author:   raimue at macports.org
Date:     2009-01-01 13:25:48 -0800 (Thu, 01 Jan 2009)
Log Message:
-----------
select:
Remove install mode and DESTDIR as it did not always remove all files on uninstall.
Use '*_select none' to remove symlinks.

Modified Paths:
--------------
    contrib/select/select.sh

Modified: contrib/select/select.sh
===================================================================
--- contrib/select/select.sh	2009-01-01 21:20:52 UTC (rev 44650)
+++ contrib/select/select.sh	2009-01-01 21:25:48 UTC (rev 44651)
@@ -48,11 +48,7 @@
 debug=0
 # skip check for required rights
 isroot=0
-# perform "install" mode (for initial destroot)
-inst_mode=0
-DESTDIR=""
 
-
 # print the usage of this tool
 usage() {
     cat <<EOD
@@ -144,13 +140,13 @@
         # test if line starts with '-' -> dont link, just rm original
         if [ "-" == $(echo ${src} | colrm 2) ]; then
             # source is unavailable for this file
-            action "rm" "${DESTDIR}${PREFIX}/${target}"
+            action "rm" "${PREFIX}/${target}"
         elif [ "/" == $(echo ${src} | colrm 2) ]; then
             # source has an absolute path
-            action "ln" "${src}" "${DESTDIR}${PREFIX}/${target}"
+            action "ln" "${src}" "${PREFIX}/${target}"
         else
             # source has relative path
-            action "ln" "${PREFIX}/${src}" "${DESTDIR}${PREFIX}/${target}"
+            action "ln" "${PREFIX}/${src}" "${PREFIX}/${target}"
         fi
         let "error = error + ${?}"
         let "i = i + 1"
@@ -181,8 +177,6 @@
             isroot=1; shift;;
         -v)
             version; exit 0;;
-        -i)
-            inst_mode=1; DESTDIR=${2}; shift; shift;;
         -s)
             list_current_selection; exit 0;;
         --)
@@ -195,15 +189,6 @@
     set -x
 fi
 
-# install mode - bypass all checks and add DESTDIR
-if [ "1" = "${inst_mode}" ]; then
-    echo "install mode: destroot: \"${DESTDIR}\""
-    CONFPATH=${DESTDIR}${CONFPATH}
-    SELECTEDVERSION=${CONFPATH}/current
-    select_version ${1}
-    exit ${?}
-fi
-
 # test if chosen version is available
 version_is_valid $1
 if [ 0 != ${?} ]; then
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090101/7a3b5abd/attachment.html>


More information about the macports-changes mailing list