Magellan Linux

Diff of /trunk/mage/usr/lib/mage/mage4.functions.sh

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

revision 2751 by niro, Tue Jul 22 14:21:01 2014 UTC revision 2752 by niro, Thu Aug 14 14:26:07 2014 UTC
# Line 761  remove_database_entry() Line 761  remove_database_entry()
761   [ ! -f ${magefile} ] && die "remove_database_entry() ${magefile} not exist."   [ ! -f ${magefile} ] && die "remove_database_entry() ${magefile} not exist."
762    
763   # remove virtuals only if no other exist   # remove virtuals only if no other exist
764   if [[ $(count_installed_pkgs --pcat ${pcat} --pname ${pname}) -le 1 ]]   if [[ $(count_installed_pkgs --pcat=${pcat} --pname=${pname}) -le 1 ]]
765   then   then
766   # first unregister virtuals   # first unregister virtuals
767   provide="$(get_value_from_magefile PROVIDE ${magefile})"   provide="$(get_value_from_magefile PROVIDE ${magefile})"
# Line 790  count_installed_pkgs() Line 790  count_installed_pkgs()
790   local i   local i
791    
792   # very basic getops   # very basic getops
793   for i in $*   for i in $@
794   do   do
795   case $1 in   case ${i} in
796   --pcat|-c) shift; pcat="$1" ;;   --pcat*) pcat="${i#*=}" ;;
797   --pname|-n) shift; pname="$1" ;;   --pname*) pname="${i#*=}" ;;
798   esac   esac
  shift  
799   done   done
800    
801   # sanity checks; abort if not given   # sanity checks; abort if not given

Legend:
Removed from v.2751  
changed lines
  Added in v.2752