Magellan Linux

Diff of /branches/mage-next/src/mage4.functions.sh.in

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

revision 2752 by niro, Tue Jul 22 14:17:53 2014 UTC revision 2753 by niro, Thu Aug 14 14:29:11 2014 UTC
# Line 737  remove_database_entry() Line 737  remove_database_entry()
737   [ ! -f ${magefile} ] && die "remove_database_entry() ${magefile} not exist."   [ ! -f ${magefile} ] && die "remove_database_entry() ${magefile} not exist."
738    
739   # remove virtuals only if no other exist   # remove virtuals only if no other exist
740   if [[ $(count_installed_pkgs --pcat ${pcat} --pname ${pname}) -le 1 ]]   if [[ $(count_installed_pkgs --pcat=${pcat} --pname=${pname}) -le 1 ]]
741   then   then
742   # first unregister virtuals   # first unregister virtuals
743   provide="$(get_value_from_magefile PROVIDE ${magefile})"   provide="$(get_value_from_magefile PROVIDE ${magefile})"
# Line 766  count_installed_pkgs() Line 766  count_installed_pkgs()
766   local i   local i
767    
768   # very basic getops   # very basic getops
769   for i in $*   for i in $@
770   do   do
771   case $1 in   case ${i} in
772   --pcat|-c) shift; pcat="$1" ;;   --pcat*) pcat="${i#*=}" ;;
773   --pname|-n) shift; pname="$1" ;;   --pname*) pname="${i#*=}" ;;
774   esac   esac
  shift  
775   done   done
776    
777   # sanity checks; abort if not given   # sanity checks; abort if not given

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