=================================================================== RCS file: /cvs/openbsd/sxxu/Attic/install.sxxu,v retrieving revision 1.9 retrieving revision 1.12 diff -u -r1.9 -r1.12 --- openbsd/sxxu/Attic/install.sxxu 2010/04/21 20:01:25 1.9 +++ openbsd/sxxu/Attic/install.sxxu 2010/04/22 22:24:29 1.12 @@ -1,5 +1,5 @@ #!/bin/ksh - -# $Id: install.sxxu,v 1.9 2010/04/21 19:01:25 andrew Exp $ +# $Id: install.sxxu,v 1.12 2010/04/22 21:24:29 andrew Exp $ # Copyright (c) 2010 Andrew Fresh # @@ -96,6 +96,7 @@ echo ' ==> Applying patches' local _p for _p in patches/*; do + [ X"patches/*" == X"${_p}" ] && continue echo " => $_p" # -N Always assume a forward patch. # -t Never prompt; assume the user is expert @@ -114,20 +115,20 @@ apply_role() { local _role="$1" - if [ ! -d "${_role}" ]; then + local _oldpwd="${PWD}" + local _rolepwd="${BASEDIR}/${_role}" + + if [ ! -d "${_rolepwd}" ]; then echo "===> Missing ${_role}" return fi echo "===> Applying ${_role}" - local _oldpwd="${PWD}" - cd "${_role}" - local _rolepwd="${PWD}" - - if [ -e siteXXrc ]; then + cd "${_rolepwd}" + if [ -e ./siteXXrc ]; then echo ' ==> Including siteXXrc' - . siteXXrc + . ./siteXXrc fi cd "${_rolepwd}" && append_pkg_path @@ -135,14 +136,14 @@ cd "${_rolepwd}" && apply_patches cd "${_rolepwd}" && install_packages - if [ -e install.site ]; then - cd "${_rolepwd}" - if [ -x install.site ]; then + cd "${_rolepwd}" + if [ -e ./install.site ]; then + if [ -x ./install.site ]; then echo ' ==> Running install.site' ./install.site else echo ' ==> Including install.site' - . install.site + . ./install.site fi fi @@ -155,6 +156,6 @@ exit fi -do_pre -process_roles -do_post +do_pre 2>&1 | /usr/bin/tee /var/log/install.log +process_roles 2>&1 | /usr/bin/tee -a /var/log/install.log +do_post 2>&1 | /usr/bin/tee -a /var/log/install.log