Changeset 82111


Ignore:
Timestamp:
Aug 8, 2011, 1:16:37 PM (9 years ago)
Author:
jmr@…
Message:

rearrange tcl package symlink creation to hopefully cover all possibilities

Location:
trunk/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/portmgr/dmg/postflight

    r81558 r82111  
    126126function link_tcl_package {
    127127    # delete old directory if present
    128     if [[ ! -L "${TCL_PACKAGE_DIR}/macports1.0" ]] && [[ -d "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
    129         rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true
    130     fi
    131     if [[ ! -e "${TCL_PACKAGE_DIR}/macports1.0" ]] && [[ -w "${TCL_PACKAGE_DIR}" ]]; then
    132                 ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
     128    if [[ ! -L "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
     129        if [[ ! -e "${TCL_PACKAGE_DIR}" ]]; then
     130            /usr/bin/install -d "${TCL_PACKAGE_DIR}" || true
     131        fi
     132        if [[ -d "${TCL_PACKAGE_DIR}/macports1.0" ]]; then
     133            rm -vrf "${TCL_PACKAGE_DIR}/macports1.0" || true
     134        fi
     135        if [[ ! -e "${TCL_PACKAGE_DIR}/macports1.0" && -d "${TCL_PACKAGE_DIR}" ]]; then
     136            ln -vs "${MACPORTS_TCL_DIR}/macports1.0" "${TCL_PACKAGE_DIR}/macports1.0" || true
     137        fi
    133138        fi
    134139}
  • trunk/base/src/macports1.0/Makefile

    r79071 r82111  
    3434        echo "${TCL_PACKAGE_DIR}" > ${DESTDIR}${prefix}/var/macports/.tclpackage
    3535        if test -z "${DESTDIR}" -a "${INSTALLPKGLINK}" != "${INSTALLDIR}"; then \
    36                 if test ! -d "${TCL_PACKAGE_DIR}"; then \
    37                         $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_DIR}" || true; \
    38                 fi; \
    39                 if test -w "${TCL_PACKAGE_DIR}"; then \
    40                         if test ! -L "${INSTALLPKGLINK}" && test -d "${INSTALLPKGLINK}"; then \
    41                                 rm -rf "${INSTALLPKGLINK}" || true; \
    42                         fi; \
    43                         if test ! -e "${INSTALLPKGLINK}"; then \
    44                                 ln -s "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
    45                         fi; \
    46                 fi; \
     36                if test ! -L "${INSTALLPKGLINK}"; then \
     37            if test ! -e "${TCL_PACKAGE_DIR}"; then \
     38                $(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} "${TCL_PACKAGE_DIR}" || true; \
     39            fi; \
     40            if test -d "${INSTALLPKGLINK}"; then \
     41                rm -vrf "${INSTALLPKGLINK}" || true; \
     42            fi; \
     43            if test ! -e "${INSTALLPKGLINK}"; then \
     44                ln -vs "${INSTALLDIR}" "${INSTALLPKGLINK}" || true; \
     45            fi; \
     46        fi; \
    4747        fi
Note: See TracChangeset for help on using the changeset viewer.