=================================================================== RCS file: /cvs/openbsd/sxxu/Attic/install.sxxu,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- openbsd/sxxu/Attic/install.sxxu 2010/04/21 20:01:25 1.9 +++ openbsd/sxxu/Attic/install.sxxu 2010/04/21 20:13:08 1.10 @@ -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.10 2010/04/21 19:13:08 andrew Exp $ # Copyright (c) 2010 Andrew Fresh # @@ -114,20 +114,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 +135,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