/[gentoo-x86]/eclass/webapp.eclass
Gentoo

Diff of /eclass/webapp.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.55 Revision 1.56
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.55 2008/02/22 14:33:35 hollow Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.56 2008/02/22 14:44:16 hollow Exp $
4# 4#
5# @ECLASS: webapp.eclass 5# @ECLASS: webapp.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# web-apps@gentoo.org 7# web-apps@gentoo.org
8# @BLURB: functions for installing applications to run under a web server 8# @BLURB: functions for installing applications to run under a web server
446 my_output="$(${WEBAPP_CONFIG} --list-installs ${PN} ${PVR})" 446 my_output="$(${WEBAPP_CONFIG} --list-installs ${PN} ${PVR})"
447 [[ $? -ne 0 ]] && return 447 [[ $? -ne 0 ]] && return
448 448
449 local x 449 local x
450 if ! use vhosts; then 450 if ! use vhosts; then
451 451 echo "${my_output}" | while read x; do
452 for x in ${my_output}; do 452 if [[ -f "${x}"/.webapp ]]; then
453 [[ -f ${x}/.webapp ]] && . ${x}/.webapp || ewarn "Cannot find file ${x}/.webapp" 453 . "${x}"/.webapp
454 if [[ -n "${WEB_HOSTNAME}" && -n "${WEB_INSTALLDIR}" ]]; then 454 if [[ -n "${WEB_HOSTNAME}" && -n "${WEB_INSTALLDIR}" ]]; then
455 ${WEBAPP_CONFIG} -C -h ${WEB_HOSTNAME} -d ${WEB_INSTALLDIR} 455 ${WEBAPP_CONFIG} -C -h ${WEB_HOSTNAME} -d ${WEB_INSTALLDIR}
456 fi
457 else
458 ewarn "Cannot find file ${x}/.webapp"
456 fi 459 fi
457 done 460 done
458 else 461 elif [[ "${my_output}" != "" ]]; then
459 462 echo
463 ewarn
460 ewarn "Don't forget to use webapp-config to remove any copies of" 464 ewarn "Don't forget to use webapp-config to remove any copies of"
461 ewarn "${PN}-${PVR} installed in" 465 ewarn "${PN}-${PVR} installed in"
462 ewarn 466 ewarn
463 467
464 for x in ${my_output}; do 468 echo "${my_output}" | while read x; do
465 [[ -f ${x}/.webapp ]] && . ${x}/.webapp || ewarn "Cannot find file ${x}/.webapp" 469 if [[ -f "${x}"/.webapp ]]; then
466 ewarn " ${x}" 470 ewarn " ${x}"
471 else
472 ewarn "Cannot find file ${x}/.webapp"
473 fi
467 done 474 done
475
476 ewarn
477 echo
468 fi 478 fi
469} 479}

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

  ViewVC Help
Powered by ViewVC 1.1.20