# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8

function has_args() {
    local arg
    for arg in "$@"; do
        case "$arg" in
        -*) ;;
        *) return 0;;
        esac
    done
    return 1
}

function get_uinstdir() {
    local p="$(pwd)"
    while [ "$p" != "$HOME" -a "$p" != "" ]; do
        if [ -f "$p/.uinst.conf" ]; then
            echo "$p"
            break
        fi
        p="${p%/*}"
    done
}
