--- trunk/mage/usr/lib/mage/mage4.functions.sh 2014/08/14 12:07:06 2751 +++ trunk/mage/usr/lib/mage/mage4.functions.sh 2014/08/14 14:26:07 2752 @@ -761,7 +761,7 @@ [ ! -f ${magefile} ] && die "remove_database_entry() ${magefile} not exist." # remove virtuals only if no other exist - if [[ $(count_installed_pkgs --pcat ${pcat} --pname ${pname}) -le 1 ]] + if [[ $(count_installed_pkgs --pcat=${pcat} --pname=${pname}) -le 1 ]] then # first unregister virtuals provide="$(get_value_from_magefile PROVIDE ${magefile})" @@ -790,13 +790,12 @@ local i # very basic getops - for i in $* + for i in $@ do - case $1 in - --pcat|-c) shift; pcat="$1" ;; - --pname|-n) shift; pname="$1" ;; + case ${i} in + --pcat*) pcat="${i#*=}" ;; + --pname*) pname="${i#*=}" ;; esac - shift done # sanity checks; abort if not given