diff options
author | Andrew Ross <aross@gentoo.org> | 2006-11-06 05:28:09 +0000 |
---|---|---|
committer | Andrew Ross <aross@gentoo.org> | 2006-11-06 05:28:09 +0000 |
commit | 9012d739924b5ce01407f90bde117137f5275f94 (patch) | |
tree | 9ca76feb2b5f9365e324e431583bb460128b20e7 /app-admin | |
parent | add docbook-xml-dtd dep only to 2.14.x ebuilds (not needed in 2.16.x), fixes ... (diff) | |
download | historical-9012d739924b5ce01407f90bde117137f5275f94.tar.gz historical-9012d739924b5ce01407f90bde117137f5275f94.tar.bz2 historical-9012d739924b5ce01407f90bde117137f5275f94.zip |
Add primitive support for "--help" option (bug #115153).
Package-Manager: portage-2.1.1-r1
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/zprod-manager/ChangeLog | 11 | ||||
-rw-r--r-- | app-admin/zprod-manager/Manifest | 64 | ||||
-rw-r--r-- | app-admin/zprod-manager/files/0.2/zprod-manager | 4 | ||||
-rw-r--r-- | app-admin/zprod-manager/files/0.3.1/zprod-manager | 349 | ||||
-rw-r--r-- | app-admin/zprod-manager/files/0.3/zprod-manager | 4 | ||||
-rw-r--r-- | app-admin/zprod-manager/files/digest-zprod-manager-0.1 | 1 | ||||
-rw-r--r-- | app-admin/zprod-manager/files/digest-zprod-manager-0.1-r1 | 1 | ||||
-rw-r--r-- | app-admin/zprod-manager/files/digest-zprod-manager-0.2 | 1 | ||||
-rw-r--r-- | app-admin/zprod-manager/files/digest-zprod-manager-0.3 | 1 | ||||
-rw-r--r-- | app-admin/zprod-manager/files/digest-zprod-manager-0.3.1 | 1 | ||||
-rw-r--r-- | app-admin/zprod-manager/zprod-manager-0.3.1.ebuild | 22 |
11 files changed, 444 insertions, 15 deletions
diff --git a/app-admin/zprod-manager/ChangeLog b/app-admin/zprod-manager/ChangeLog index e591da793680..cd475b82531e 100644 --- a/app-admin/zprod-manager/ChangeLog +++ b/app-admin/zprod-manager/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-admin/zprod-manager -# Copyright 2003-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/ChangeLog,v 1.16 2005/09/06 02:36:40 weeve Exp $ +# Copyright 2003-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/ChangeLog,v 1.17 2006/11/06 05:28:09 aross Exp $ + +*zprod-manager-0.3.1 (06 Nov 2006) + + 06 Nov 2006; <aross@gentoo.org> files/0.2/zprod-manager, + +files/0.3.1/zprod-manager, files/0.3/zprod-manager, + +zprod-manager-0.3.1.ebuild: + Add primitive support for "--help" option (bug #115153). 06 Sep 2005; Jason Wever <weeve@gentoo.org> zprod-manager-0.3.ebuild: Stable on SPARC. diff --git a/app-admin/zprod-manager/Manifest b/app-admin/zprod-manager/Manifest index 89239024dcfa..8e636667117b 100644 --- a/app-admin/zprod-manager/Manifest +++ b/app-admin/zprod-manager/Manifest @@ -1,13 +1,59 @@ -MD5 b288a68d4bae6bb92f9a3567baf522f4 ChangeLog 2401 -MD5 1652522405f5936eb29776ef8d5ffa5b metadata.xml 310 +AUX 0.1/zprod-manager 7156 RMD160 741d53aa3d415f1180ff77ba1e57a2f8ab986be7 SHA1 0f395532015715bf29f939fd6e3e295be4fbdc68 SHA256 8038fb769486238e15d6a369ede8478c99442408026091988131f42f99a0608c +MD5 6093a6000b6b8a6577e7948f0f180877 files/0.1/zprod-manager 7156 +RMD160 741d53aa3d415f1180ff77ba1e57a2f8ab986be7 files/0.1/zprod-manager 7156 +SHA256 8038fb769486238e15d6a369ede8478c99442408026091988131f42f99a0608c files/0.1/zprod-manager 7156 +AUX 0.2/zprod-manager 7507 RMD160 e69f8c44ef193323e43696d4c1a43d0b7822e08e SHA1 1846808610d70528dfd3f216aeb50ab049c43d97 SHA256 aac2b270a524a4ef173a99cf7ab53450418690812d6df28fd52db781cb9ddd7b +MD5 21397c1d8c16b7bfd47a1c07dc4de33d files/0.2/zprod-manager 7507 +RMD160 e69f8c44ef193323e43696d4c1a43d0b7822e08e files/0.2/zprod-manager 7507 +SHA256 aac2b270a524a4ef173a99cf7ab53450418690812d6df28fd52db781cb9ddd7b files/0.2/zprod-manager 7507 +AUX 0.3.1/zprod-manager 8424 RMD160 02261aec98cc4fb16254f052560b7622b4a857b2 SHA1 1ab27279f8b2b8abcba2340c986f38017bc36ccf SHA256 dc4f537b2c5e0c9135ae9594572d8b3200c8c468987f9a5e27688705fe3c7d40 +MD5 1923e470824c4ce896dc1cf2fadeb3d7 files/0.3.1/zprod-manager 8424 +RMD160 02261aec98cc4fb16254f052560b7622b4a857b2 files/0.3.1/zprod-manager 8424 +SHA256 dc4f537b2c5e0c9135ae9594572d8b3200c8c468987f9a5e27688705fe3c7d40 files/0.3.1/zprod-manager 8424 +AUX 0.3/zprod-manager 8339 RMD160 5e890d2dbe362a645acde90b036e0272cf4db3ea SHA1 2a3c9aa7019a714c19edc1e8b2c6896671216e0f SHA256 56a7ecbf588fe3588643bebda857f7c4e43cc6c89914ce55a18601646b46f1e9 +MD5 8ac445c2475a949c485ca1255dd36445 files/0.3/zprod-manager 8339 +RMD160 5e890d2dbe362a645acde90b036e0272cf4db3ea files/0.3/zprod-manager 8339 +SHA256 56a7ecbf588fe3588643bebda857f7c4e43cc6c89914ce55a18601646b46f1e9 files/0.3/zprod-manager 8339 +EBUILD zprod-manager-0.1-r1.ebuild 549 RMD160 31b2ac58f0087bc11393fb8fde614d86b7d2fb0a SHA1 49eeda856aff62f0acf77e0b9eebe73281bb7631 SHA256 3faa017e4b1cf373418c5991b6802a0757d63c9fbb32b4e897a2469c1e1750b6 MD5 ce0a39c22c87706f8e12df805bc28f42 zprod-manager-0.1-r1.ebuild 549 +RMD160 31b2ac58f0087bc11393fb8fde614d86b7d2fb0a zprod-manager-0.1-r1.ebuild 549 +SHA256 3faa017e4b1cf373418c5991b6802a0757d63c9fbb32b4e897a2469c1e1750b6 zprod-manager-0.1-r1.ebuild 549 +EBUILD zprod-manager-0.1.ebuild 547 RMD160 707892cf74fb451ce3294096a0234885a7eeae2a SHA1 107a5c7feec6720513cf20460cfe19ac2b747731 SHA256 489807d250052ec9c1abc08a55caca0b0033e4eac1882b437e120f484a3eae58 MD5 dba532d4e802b938d0bf0dcdae9e447d zprod-manager-0.1.ebuild 547 +RMD160 707892cf74fb451ce3294096a0234885a7eeae2a zprod-manager-0.1.ebuild 547 +SHA256 489807d250052ec9c1abc08a55caca0b0033e4eac1882b437e120f484a3eae58 zprod-manager-0.1.ebuild 547 +EBUILD zprod-manager-0.2.ebuild 548 RMD160 53d58643063ae9656a92501d0272c6c0a5469c34 SHA1 d7743befe70a4f049d7dc72892a675f4a6400157 SHA256 1866c635a54cbe503f400abf8f5673c4a1c3f63b4eeed883d319fe438581b033 MD5 02473620f4698f6c492eeacd4f9d1597 zprod-manager-0.2.ebuild 548 +RMD160 53d58643063ae9656a92501d0272c6c0a5469c34 zprod-manager-0.2.ebuild 548 +SHA256 1866c635a54cbe503f400abf8f5673c4a1c3f63b4eeed883d319fe438581b033 zprod-manager-0.2.ebuild 548 +EBUILD zprod-manager-0.3.1.ebuild 578 RMD160 e1048b8b60d5a2b363f0bfff78b5446c054f7bf3 SHA1 a488af2d2492ae8c467e12293ce5cacdfddaa537 SHA256 bfa3d3064836430900d35cc7cc2f08004901d7fabced7979e7621a1792b30cd7 +MD5 fa281f628c6225f9f48493ad0bfe8e05 zprod-manager-0.3.1.ebuild 578 +RMD160 e1048b8b60d5a2b363f0bfff78b5446c054f7bf3 zprod-manager-0.3.1.ebuild 578 +SHA256 bfa3d3064836430900d35cc7cc2f08004901d7fabced7979e7621a1792b30cd7 zprod-manager-0.3.1.ebuild 578 +EBUILD zprod-manager-0.3.ebuild 547 RMD160 b00a88055887d1e2a9bfd87377612967404ca1d2 SHA1 f42b1bf47194e77c893ee410136a646ac613b9ed SHA256 3d067b5fbba3cefc5b1680d21aa68b114e963591a5d661dcae1db3463089bb4a MD5 2cf0f79b270045f9e429c065bba108c9 zprod-manager-0.3.ebuild 547 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-zprod-manager-0.1 0 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-zprod-manager-0.1-r1 0 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-zprod-manager-0.2 0 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-zprod-manager-0.3 0 -MD5 6093a6000b6b8a6577e7948f0f180877 files/0.1/zprod-manager 7156 -MD5 9f5238b587912d86d46cb38617ad8475 files/0.2/zprod-manager 7507 -MD5 8ea036d0182113e58aa90e24e2ae53bc files/0.3/zprod-manager 8339 +RMD160 b00a88055887d1e2a9bfd87377612967404ca1d2 zprod-manager-0.3.ebuild 547 +SHA256 3d067b5fbba3cefc5b1680d21aa68b114e963591a5d661dcae1db3463089bb4a zprod-manager-0.3.ebuild 547 +MISC ChangeLog 2642 RMD160 d30807a3fdb052384ec7afb5f97eddfc9f46ca9b SHA1 49d7fb58dd8fc864e1662dd5b992425d79372166 SHA256 ca70d6b5cfecde49d6bb95ba594f21d42f33faab715997292bea1bcf828e61bc +MD5 2d361e18e8667d1d1a136d3123eaa697 ChangeLog 2642 +RMD160 d30807a3fdb052384ec7afb5f97eddfc9f46ca9b ChangeLog 2642 +SHA256 ca70d6b5cfecde49d6bb95ba594f21d42f33faab715997292bea1bcf828e61bc ChangeLog 2642 +MISC metadata.xml 310 RMD160 5b59fc85d3bafae0872cf691e5f032bac39ba539 SHA1 bdd3f2bc135db7a1475e69cf818c6644a6146d3f SHA256 39e1273dd60bd3ceb460e9366a648c8fa21db1c292df4573e69f41cf6c84f6fc +MD5 1652522405f5936eb29776ef8d5ffa5b metadata.xml 310 +RMD160 5b59fc85d3bafae0872cf691e5f032bac39ba539 metadata.xml 310 +SHA256 39e1273dd60bd3ceb460e9366a648c8fa21db1c292df4573e69f41cf6c84f6fc metadata.xml 310 +MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-zprod-manager-0.1 1 +RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-zprod-manager-0.1 1 +SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-zprod-manager-0.1 1 +MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-zprod-manager-0.1-r1 1 +RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-zprod-manager-0.1-r1 1 +SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-zprod-manager-0.1-r1 1 +MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-zprod-manager-0.2 1 +RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-zprod-manager-0.2 1 +SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-zprod-manager-0.2 1 +MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-zprod-manager-0.3 1 +RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-zprod-manager-0.3 1 +SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-zprod-manager-0.3 1 +MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-zprod-manager-0.3.1 1 +RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-zprod-manager-0.3.1 1 +SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-zprod-manager-0.3.1 1 diff --git a/app-admin/zprod-manager/files/0.2/zprod-manager b/app-admin/zprod-manager/files/0.2/zprod-manager index 3c34870d5542..00abd537c17a 100644 --- a/app-admin/zprod-manager/files/0.2/zprod-manager +++ b/app-admin/zprod-manager/files/0.2/zprod-manager @@ -2,9 +2,9 @@ # Gentoo Zope Product selection tool. # Copyright 2003 Jason Shoemaker <kutsuya@gentoo.org> # Distributed under GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.2/zprod-manager,v 1.1 2004/09/26 21:31:55 radek Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.2/zprod-manager,v 1.2 2006/11/06 05:28:09 aross Exp $ -VERSION="0.1" +VERSION="0.2" COMMAND_LIST="add del" ZS_DIR="/usr/share/zope/" ZI_DIR="/var/lib/zope/" diff --git a/app-admin/zprod-manager/files/0.3.1/zprod-manager b/app-admin/zprod-manager/files/0.3.1/zprod-manager new file mode 100644 index 000000000000..1f7764325aa8 --- /dev/null +++ b/app-admin/zprod-manager/files/0.3.1/zprod-manager @@ -0,0 +1,349 @@ +#!/bin/bash +# Gentoo Zope Product selection tool. +# Copyright 2003 Jason Shoemaker <kutsuya@gentoo.org> +# Distributed under GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.3.1/zprod-manager,v 1.1 2006/11/06 05:28:09 aross Exp $ + +VERSION="0.3.1" +COMMAND_LIST="add del" +ZS_DIR="/usr/share/zope/" +ZI_DIR="/var/lib/zope/" +ZPROD_DIR="/usr/share/zproduct/" + +ZINST_DEFAULT=".default" +ZPROD_FLIST_FNAME=".zfolder.lst" +ZPROD_PLIST_FNAME=".zproduct.lst" + +# Assume the standard dialog return codes +#DIALOG_CANCEL=1 +#DIALOG_ERROR=-1 +#DIALOG_ESC=-255 +#DIALOG_OK=0 +#DIALOG_ERROR may equal #DIALOG_ESC + +# Return codes used in this program: +E_SUCCESS=0 +E_FAILURE=1 + +E_ZPLIST=20 +E_ZILIST=22 +E_COMMAND=24 +E_OVERWRITE=26 + +## copied from zope-config + +zinst_dir_get() +{ + local RESULT=${E_FAILURE} + local LIST=$(ls ${ZI_DIR}) + local LIST_CNT=$(echo ${LIST} | wc -w) + local DLIST= + + if [ ${LIST_CNT} -eq 1 ] ; then + ZINST_DIR=${LIST} + RESULT=${E_SUCCESS} + elif [ ${LIST_CNT} -ne 0 ] ; then + for N in ${LIST} ; do + DLIST="${DLIST} $N -" + done + ZINST_DIR=$(dialog --stdout \ + --title "Zope Instance List" \ + --menu "Select desired zinstance:" 0 0 ${LIST_CNT} ${DLIST}) + RESULT=$? + else + RESULT=${E_ZILIST} # There are no zinstances + fi + ZINST_DIR="${ZI_DIR}${ZINST_DIR}" + return ${RESULT} +} + +# params: none +# TODO: Maybe try to break this function down some more. +# TODO: verify items in ZP_PLIST and ZI_PLIST + +mode_interactive() +{ + local RESULT= + if [ $(is_command "${COMMAND_LIST}" ${1})${?} -ne 0 ] ; then + RESULT=${?} + return ${RESULT} + fi + ZP_PLIST=$(ls ${ZPROD_DIR}) + if [ "${ZP_PLIST}" ] ; then + zinst_dir_get + RESULT=$? + if [ ${RESULT} -eq 0 ] ; then + ZI_PLIST=$(cat ${ZINST_DIR}/${ZPROD_PLIST_FNAME}) + # Create CLIST for --menu + if [ "${ZI_PLIST}" ] ; then + for N in ${ZP_PLIST} ; do + echo ${ZI_PLIST} |grep ${N} >/dev/null + if [ $? -eq 0 ] ; then + STATUS=ON + else + STATUS=OFF + fi + CLIST="${CLIST} ${N} - ${STATUS}" + done + CTAGS=$(dialog --stdout \ + --backtitle "Select the zproducts you want installed for zinstance(${ZINST_DIR})." \ + --checklist "Select:" 0 0 0 ${CLIST}) + RESULT=$? + CTAGS=$(echo ${CTAGS} | sed -e "s:\"::g") + # Prepare to add and delete zproducts installed in zinstance + if [[ ${RESULT} -eq 0 && "${CTAGS}" ]] ; then + for N in ${ZI_PLIST} ; do + echo "$CTAGS" |grep ${N} >/dev/null + if [ $? -ne 0 ] ; then + prod_del ${ZPROD_DIR}/${N} ${ZINST_DIR} + fi + done + for N in ${CTAGS} ; do + echo ${ZI_PLIST} |grep ${N} >/dev/null + if [ $? -ne 0 ] ; then + prod_add ${ZPROD_DIR}/${N} ${ZINST_DIR} + fi + done + RESULT=$? + elif [ ${RESULT} -eq 0 ] ; then # $CTAGS is empty + for N in ${ZI_PLIST} ; do + prod_del ${ZPROD_DIR}/${N} ${ZINST_DIR} + done + RESULT=$? + fi + else # ZI_PLIST is empty + for N in ${ZP_PLIST} ; do + CLIST="${CLIST} ${N} - 0" + done + CTAGS=$(dialog --stdout \ + --backtitle "Select the zproducts you want installed for zinstance(${ZINST_DIR})." \ + --checklist "Select:" 0 0 0 ${CLIST}) + RESULT=$? + CTAGS=$(echo "${CTAGS}" | sed -e "s:\"::g") + if [[ ${RESULT} -eq 0 && "${CTAGS}" ]] ; then + for N in ${CTAGS} ; do + # as this is empty Products directory in instance if-case, we can safely ignore + # RESULT returned from prod_add in case of overwrite error. It can not happen + # when ZI_PLIST is empty, right? ;) <radek@gentoo.org> + prod_add ${ZPROD_DIR}/${N} ${ZINST_DIR} + done + fi + fi + fi + else # ZP_PLIST is empty + RESULT=${E_ZPLIST} + fi + return ${RESULT} +} + + +# Parameters: +# $1 = command list +# $2 = command received +# Returns: +# true or false + +is_command() +{ + local RESULT=${E_COMMAND} + local N= + + echo ${1} |grep ${2} >/dev/null + if [ $? -eq 0 ] ; then + RESULT=0 + fi + + return ${RESULT} +} + +# Parameters: +# $1 = /path/to/zinstance +# Returns: +# true or false + +is_zinstanceDir() +{ + local RESULT=${E_ZILIST} + # If can't find these, probably not a zinstance. + if [[ -d "${1}/Products" && -d "${1}/var" && -d "${1}/import" && -d "${1}/Extensions" ]] ; then + RESULT=0 + fi + return ${RESULT} +} + +# Parameters: +# $1 = /path/to/zproduct +# Returns: +# true or false + +is_zproductDir() +{ + local RESULT=${E_ZPLIST} + # look for something in .zproduct.lst in $1, if we can't find that... + if [ -s "${1}/${ZPROD_FLIST_FNAME}" ] ; then + RESULT=0 + fi + return ${RESULT} +} + +# Parameters: +# $1 = /path/to/zinst_dir +# Returns: +# stdout = name of defautl zinstance, if any. + +zinst_default_get() +{ + if [ -s ${1}/${ZINST_DEFAULT} ] ; then + cat ${1}/${ZINST_DEFAULT} + fi +} + +# Parameters: +# $1 = /path/to/zproduct +# $2 = /path/to/zinstance + +# be warned, using this function you have to immediately fail if functionss returns error. + +prod_add() +{ + local RESULT= + local N= + + # checks if some products components are already installed, + # if yes, we have to break with error, as overwrites are DANGEROUS! + for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") + do + if [ -d ${2}/Products/${N} ] + then + echo "ZPROD-MANAGER WARNING: Overwrite possiblity detected at ${N}" + return ${E_OVERWRITE} + fi + done + + for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") ; do + # we do copy instead of link, because its much safer, and zope-development-way compliant + cp -Ra ${1}/${N} ${2}/Products + done + RESULT=$? + if [ ${RESULT} -eq 0 ] ; then + # basically adding ${PF} to .zproduct.lst + echo $(basename $1) >> ${2}/${ZPROD_PLIST_FNAME} + sort -u ${2}/${ZPROD_PLIST_FNAME} > ${2}/.tmp + mv -f ${2}/.tmp ${2}/${ZPROD_PLIST_FNAME} + RESULT=$? + + for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") ; do + # setting owner and group as in Products folder, so we can compile + # python scripts with the zope user + + chown -R `stat -c %U:%G ${2}/Products` ${2}/Products/${N} + + # gives group writing perms (very often need in development teams) + # takes all perms from others to comply with 770 instance policy + chmod -R g+rwX,o-rwx ${2}/Products/${N} + done + fi + + return ${RESULT} +} + +# Parameters: +# $1 = /path/to/zproduct +# $2 = /path/to/zinstance + +prod_del() +{ + local RESULT= + local N= + local PF=$(basename $1) + + grep "${PF}" "${2}/${ZPROD_PLIST_FNAME}" >/dev/null + RESULT=$? + if [ ${RESULT} -eq 0 ] ; then + for N in $(cat ${1}/${ZPROD_FLIST_FNAME}) ; do + rm -rf ${2}/Products/${N} + done + # remove zproduct from .zproduct.lst + sed -i -e "s/${PF}$//" -e "/^$/d" ${2}/${ZPROD_PLIST_FNAME} + RESULT=$? + fi + return ${RESULT} +} + +# Parameters: +# $1 = (optional) error message + +mode_help() +{ + echo "$(basename $0) version ${VERSION}" + echo "A Gentoo Zope Product selection tool." + echo + echo "Interactive usage:" + echo -e "\t$(basename $0) [add | del]" + echo "Default zinstance usage:" + echo -e "\t$(basename $0) [add |del] /path/of/zproduct" + echo "Non-interactive usage:" + echo -e "\t$(basename $0) [add | del] /path/of/zproduct /path/of/zinstance/" +} + +# Parameters: +# $1 = command +# $2 = /path/to/zproductDir + +mode_defaultZinst() +{ + local DEFAULT_ZINST=$(zinst_default_get ${ZI_DIR}) + local RESULT=$? + if [ -n "${DEFAULT_ZINST}" ] ; then + mode_explicit ${1} ${2} ${ZI_DIR}/${DEFAULT_ZINST} + RESULT=${?} + fi + return ${RESULT} +} + +# Parameters: +# $1 = command +# $2 = /path/to/zproduct +# $3 = /path/to/zinstance + +mode_explicit() +{ + local RESULT= + if [[ $(is_command "${COMMAND_LIST}" ${1})${?} -eq 0 && \ + $(is_zproductDir ${2})${?} -eq 0 && \ + $(is_zinstanceDir ${3})${?} -eq 0 ]] ; then + if [ ${1} = "add" ] ; then + prod_add ${2} ${3} + RESULT=$? + elif [ ${1} = "del" ] ; then + prod_del ${2} ${3} + RESULT=$? + else + RESULT=${E_COMMAND} + fi + fi + return ${RESULT} +} + +### MAIN + +if [ ${!#} = "--help" ] ; then + mode_help +else + case "${#}" in + 0) mode_help ;; + 1) mode_interactive ${1} ;; + 2) mode_defaultZinst ${1} ${2} ;; + 3) mode_explicit ${1} ${2} ${3} ;; + *) mode_help "Error: Too many parameters" ;; + esac +fi + +RESULT=$? + +if [ ${RESULT} -ne 0 ] ; then + echo "ERROR ${?}" +fi + + +# vim:ts=8 diff --git a/app-admin/zprod-manager/files/0.3/zprod-manager b/app-admin/zprod-manager/files/0.3/zprod-manager index e7622c8a23c3..cc22dc784fd9 100644 --- a/app-admin/zprod-manager/files/0.3/zprod-manager +++ b/app-admin/zprod-manager/files/0.3/zprod-manager @@ -2,9 +2,9 @@ # Gentoo Zope Product selection tool. # Copyright 2003 Jason Shoemaker <kutsuya@gentoo.org> # Distributed under GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.3/zprod-manager,v 1.1 2004/10/07 21:23:50 radek Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/files/0.3/zprod-manager,v 1.2 2006/11/06 05:28:09 aross Exp $ -VERSION="0.1" +VERSION="0.3" COMMAND_LIST="add del" ZS_DIR="/usr/share/zope/" ZI_DIR="/var/lib/zope/" diff --git a/app-admin/zprod-manager/files/digest-zprod-manager-0.1 b/app-admin/zprod-manager/files/digest-zprod-manager-0.1 index e69de29bb2d1..8b137891791f 100644 --- a/app-admin/zprod-manager/files/digest-zprod-manager-0.1 +++ b/app-admin/zprod-manager/files/digest-zprod-manager-0.1 @@ -0,0 +1 @@ + diff --git a/app-admin/zprod-manager/files/digest-zprod-manager-0.1-r1 b/app-admin/zprod-manager/files/digest-zprod-manager-0.1-r1 index e69de29bb2d1..8b137891791f 100644 --- a/app-admin/zprod-manager/files/digest-zprod-manager-0.1-r1 +++ b/app-admin/zprod-manager/files/digest-zprod-manager-0.1-r1 @@ -0,0 +1 @@ + diff --git a/app-admin/zprod-manager/files/digest-zprod-manager-0.2 b/app-admin/zprod-manager/files/digest-zprod-manager-0.2 index e69de29bb2d1..8b137891791f 100644 --- a/app-admin/zprod-manager/files/digest-zprod-manager-0.2 +++ b/app-admin/zprod-manager/files/digest-zprod-manager-0.2 @@ -0,0 +1 @@ + diff --git a/app-admin/zprod-manager/files/digest-zprod-manager-0.3 b/app-admin/zprod-manager/files/digest-zprod-manager-0.3 index e69de29bb2d1..8b137891791f 100644 --- a/app-admin/zprod-manager/files/digest-zprod-manager-0.3 +++ b/app-admin/zprod-manager/files/digest-zprod-manager-0.3 @@ -0,0 +1 @@ + diff --git a/app-admin/zprod-manager/files/digest-zprod-manager-0.3.1 b/app-admin/zprod-manager/files/digest-zprod-manager-0.3.1 new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/app-admin/zprod-manager/files/digest-zprod-manager-0.3.1 @@ -0,0 +1 @@ + diff --git a/app-admin/zprod-manager/zprod-manager-0.3.1.ebuild b/app-admin/zprod-manager/zprod-manager-0.3.1.ebuild new file mode 100644 index 000000000000..cc667c9e73b2 --- /dev/null +++ b/app-admin/zprod-manager/zprod-manager-0.3.1.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/zprod-manager/zprod-manager-0.3.1.ebuild,v 1.1 2006/11/06 05:28:09 aross Exp $ + +DESCRIPTION="Gentoo Zope Product selection tool" +SRC_URI="" +HOMEPAGE="http://www.gentoo.org/" + +SLOT="0" +LICENSE="GPL-2" +IUSE="" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +DEPEND="" +RDEPEND=">=dev-util/dialog-0.7 + sys-apps/grep + sys-apps/sed + >=net-zope/zope-2.6.0-r2" + +src_install() { + dosbin "${FILESDIR}/${PV}"/zprod-manager || die "install failed" +} |