[BACK]Return to install.sxxu CVS log [TXT][DIR] Up to [local] / openbsd / sxxu

Diff for /openbsd/sxxu/Attic/install.sxxu between version 1.9 and 1.15

version 1.9, 2010/04/21 20:01:25 version 1.15, 2010/04/22 23:50:42
Line 25 
Line 25 
 export PKG_PATH  export PKG_PATH
   
 do_pre() {  do_pre() {
     # nothing to do      echo 'Running post install from sxxu'
 }  }
   
 do_post() {  do_post() {
     # nothing to do      echo 'See /var/log/install.log for install messages.'
 }  }
   
 process_roles() {  process_roles() {
Line 45 
Line 45 
     set -A _roles      set -A _roles
     local _role      local _role
     while read _role; do      while read _role; do
         if [ -n "${_role}" ]; then      if [ -n "${_role}" ]; then
                 _roles[${#_roles[@]}]="$_role"              _roles[${#_roles[@]}]="$_role"
         fi      fi
     done < roles      done < roles
   
     for _role in "${_roles[@]}"; do      for _role in "${_roles[@]}"; do
Line 84 
Line 84 
         echo " ==> Running $_cmd $_args"          echo " ==> Running $_cmd $_args"
         local _line          local _line
         while read _line; do          while read _line; do
             echo "  => ${_line}"              echo "  => ${_cmd} ${_args} ${_line}"
             eval ${_cmd} ${_args} ${_line}              eval ${_cmd} ${_args} ${_line}
         done < ${_f}          done < ${_f}
     done      done
Line 96 
Line 96 
     echo ' ==> Applying patches'      echo ' ==> Applying patches'
     local _p      local _p
     for _p in patches/*; do      for _p in patches/*; do
           [ X"patches/*" == X"${_p}" ] && continue
         echo "  => $_p"          echo "  => $_p"
         # -N Always assume a forward patch.          # -N Always assume a forward patch.
         # -t Never prompt; assume the user is expert          # -t Never prompt; assume the user is expert
Line 114 
Line 115 
 apply_role() {  apply_role() {
     local _role="$1"      local _role="$1"
   
     if [ ! -d "${_role}" ]; then      local _oldpwd="${PWD}"
       local _rolepwd="${BASEDIR}/${_role}"
   
       if [ ! -d "${_rolepwd}" ]; then
         echo "===> Missing ${_role}"          echo "===> Missing ${_role}"
         return          return
     fi      fi
   
     echo "===> Applying ${_role}"      echo "===> Applying role ${_role}"
   
     local _oldpwd="${PWD}"      cd "${_rolepwd}"
     cd "${_role}"      if [ -e ./siteXXrc ]; then
     local _rolepwd="${PWD}"  
   
     if [ -e siteXXrc ]; then  
         echo ' ==> Including siteXXrc'          echo ' ==> Including siteXXrc'
         . siteXXrc          . ./siteXXrc
     fi      fi
   
     cd "${_rolepwd}" && append_pkg_path      cd "${_rolepwd}" && append_pkg_path
Line 135 
Line 136 
     cd "${_rolepwd}" && apply_patches      cd "${_rolepwd}" && apply_patches
     cd "${_rolepwd}" && install_packages      cd "${_rolepwd}" && install_packages
   
     if [ -e install.site ]; then      cd "${_rolepwd}"
         cd "${_rolepwd}"      if [ -e ./install.site ]; then
         if [ -x install.site ]; then          if [ -x ./install.site ]; then
             echo ' ==> Running install.site'              echo ' ==> Running install.site'
             ./install.site              ./install.site
         else          else
             echo ' ==> Including install.site'              echo ' ==> Including install.site'
             . install.site              . ./install.site
         fi          fi
     fi      fi
   
Line 155 
Line 156 
     exit      exit
 fi  fi
   
 do_pre  do_pre        2>&1 | /usr/bin/tee    /var/log/install.log
 process_roles  process_roles 2>&1 | /usr/bin/tee -a /var/log/install.log | grep '^...>'
 do_post  do_post       2>&1 | /usr/bin/tee -a /var/log/install.log

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.15

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>