Changeset cf3ebf7a


Ignore:
Timestamp:
Feb 21, 2006, 12:25:40 AM (19 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
d285e92
Parents:
bffaa02
Message:

r617@server (orig r615): ryan | 2005-08-05 23:49:16 -0700
Update to alter JAVA_HOME and JAVA locations in the environment when
building multilib... this needs to be done a WHOLE lot better...



File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/funcs/multiarch-funcs.sh

    rbffaa02 rcf3ebf7a  
    5151                    sed -e "s@lib[36][124]@lib@g"  -e "s@lib@${libdirname}@g" `
    5252
     53   # JAVA handling ... see java-setup.sh
     54   #------------------------------------
     55   # TODO: This needs to be done a WHOLE lot better...
     56   TMP_JAVA_HOME="${JAVA_INSTALLDIR}/jdk${JAVA_VER}"
     57   if [ "${MULTIARCH}" = "Y" ]; then
     58      TMP_JAVA_HOME="${TMP_JAVA_HOME}-${BUILDENV}"
     59   fi
     60   if [ -d "${TMP_JAVA_HOME}" ]; then
     61      export JAVA_HOME="${TMP_JAVA_HOME}"
     62
     63      # Alter PATH
     64      echo "${PATH}" | grep "${JAVA_INSTALLDIR}/jdk${JAVA_VER}" \
     65         > /dev/null 2>&1 &&
     66      {
     67         PATH=`echo "${PATH}" | sed -e "s@${JAVA_INSTALLDIR}/jdk${JAVA_VER}\(\|-[36][124]\)@${JAVA_HOME}@g" `
     68      } || {
     69         PATH="${PATH}:${JAVA_HOME}/bin"
     70      }
     71   fi
     72
    5373}
    5474
     
    197217
    198218use_wrapper() {
     219set -x
    199220   # Use full path
    200221   wrapper=/usr/bin/multilib_wrapper
     
    218239      fi
    219240
     241      if [ -L ${file} ]; then
     242         # eek, old wrapper symlink wasn't replaced...
     243         echo "use_wrapper: error, ${file} is a symlink" 1>&2
     244         return 1
     245      fi
     246         
     247         
    220248      # do the work
    221249      mv ${file} ${file}-${BUILDENV} &&
    222       ln -sf ${wrapper} ${file} &&
     250      ln -sfnv ${wrapper} ${file} &&
    223251      echo "   - ${file}" || {
    224252         echo "use_wrapper: error creating ${file}" 1>&2
     
    227255
    228256   done
     257set +x
    229258}
    230259
Note: See TracChangeset for help on using the changeset viewer.