View | Details | Raw Unified
Collapse All | Expand All

(-) /home/tupone/gentoo-x86/app-admin/zprod-manager/files/0.3.1/zprod-manager (-2 / +27 lines)
 Lines 12-17    Link Here 
ZINST_DEFAULT=".default"
ZINST_DEFAULT=".default"
ZPROD_FLIST_FNAME=".zfolder.lst" 
ZPROD_FLIST_FNAME=".zfolder.lst" 
ZPROD_LLIST_FNAME=".zlfolder.lst" 
ZPROD_PLIST_FNAME=".zproduct.lst"
ZPROD_PLIST_FNAME=".zproduct.lst"
# Assume the standard dialog return codes
# Assume the standard dialog return codes
 Lines 220-228    Link Here 
        fi
        fi
    done
    done
    for N in $(cat "${1}/${ZPROD_FLIST_FNAME}") ; do
    if [ -e ${1}/Products ] ; then
    	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}/Products/${N} ${2}/Products
    	done
    else
    	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
    fi
    for N in $(cat "${1}/${ZPROD_LLIST_FNAME}") ; do
        # we do copy instead of link, because its much safer, and zope-development-way compliant
        # we do copy instead of link, because its much safer, and zope-development-way compliant
	cp -Ra ${1}/${N} ${2}/Products
	cp -Ra ${1}/lib/python/${N} ${2}/lib/python
    done
    done
    RESULT=$?
    RESULT=$?
    if [ ${RESULT} -eq 0 ] ; then
    if [ ${RESULT} -eq 0 ] ; then
 Lines 242-247    Link Here 
            # takes all perms from others to comply with 770 instance policy
            # takes all perms from others to comply with 770 instance policy
            chmod -R g+rwX,o-rwx ${2}/Products/${N}
            chmod -R g+rwX,o-rwx ${2}/Products/${N}
        done
        done
        for N in $(cat "${1}/${ZPROD_LLIST_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}/lib/python/${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}/lib/python/${N}
        done
    fi
    fi
    return ${RESULT}
    return ${RESULT}
 Lines 263-268    Link Here 
	for N in $(cat ${1}/${ZPROD_FLIST_FNAME}) ; do
	for N in $(cat ${1}/${ZPROD_FLIST_FNAME}) ; do
	    rm -rf ${2}/Products/${N}
	    rm -rf ${2}/Products/${N}
    	done
    	done
	for N in $(cat ${1}/${ZPROD_LLIST_FNAME}) ; do
	    rm -rf ${2}/lib/python/${N}
    	done
	# remove zproduct from .zproduct.lst
	# remove zproduct from .zproduct.lst
	sed -i -e "s/${PF}$//" -e "/^$/d" ${2}/${ZPROD_PLIST_FNAME}
	sed -i -e "s/${PF}$//" -e "/^$/d" ${2}/${ZPROD_PLIST_FNAME}
	RESULT=$?
	RESULT=$?