--- branches/mage-next/src/mage4.functions.sh.in 2014/08/14 14:26:07 2752 +++ branches/mage-next/src/mage4.functions.sh.in 2014/08/14 14:29:11 2753 @@ -737,7 +737,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})" @@ -766,13 +766,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" ;; - esac - shift + case ${i} in + --pcat*) pcat="${i#*=}" ;; + --pname*) pname="${i#*=}" ;; + esac done # sanity checks; abort if not given