install-common 742 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
    # Common functions for all install scripts

    # install_alternative -- add an alternative
    #
    # install_alternative program
    function install_alternative() {
        local program="$1"
        update-alternatives \
	    --install "/usr/bin/$program" "$program" \
	    "$j2se_base/bin/$program" "$priority" \
	    --slave "/usr/share/man/man1/$program.1.gz" "$program.1.gz" \
	    "$j2se_base/man/man1/$program.1.gz"
    }

    # install_java_plugin -- add an alternative for a browser plugin
    #
    # install_java_plugin browser_plugin_path java_plugin_path priority
    function install_java_plugin() {
        [ -d "$1" ] || install -d -m 755 "$1"
        update-alternatives \
	    --install "$1/$2" "$3" "$4" "$5"
    }