is_installed() { for LOCATION in `cat /etc/ipkg.conf | grep "^dest\>" | cut -d ' ' -f 3`; do if [ $LOCATION = "/" ]; then grep -q "^$1\$" /usr/lib/ipkg/status else grep -q "^$1\$" $LOCATION/usr/lib/ipkg/status fi done }