post_install() {

    # Check to see if the user needs to know about other archive types
    which zip &> /dev/null
    haszip=$?
    which unzip &> /dev/null
    hasunzip=$?
    which unrar &> /dev/null
    hasunrar=$?
    which 7z &> /dev/null
    has7z=$?
    which arj &> /dev/null
    hasarj=$?
    which bzip2 &> /dev/null
    hasbzip=$?

    if [ $haszip -eq 1 -o $hasunzip -eq 1 -o $hasunrar -eq 1 -o $has7z -eq 1 -o $hasarj -eq 1 -o $hasbzip -eq 1 ]; then

        echo ">>> Certain archive types cannot be opened without the following:"

        if [ $haszip -eq 1 -o $hasunzip -eq 1 ]; then
            echo ">>> - for zip support, install the 'zip' and 'unzip' packages."
        fi

        if [ $hasunrar -eq 1 ]; then
            echo ">>> - for rar support, install the 'unrar' package."
        fi

        if [ $has7z -eq 1 ]; then
            echo ">>> - for 7zip (7z) support, install the 'p7zip' package."
        fi

        if [ $hasarj -eq 1 ]; then
            echo ">>> - for arj support, install the 'arj' package."
        fi
	
	if [ $hasbzip -eq 1 ]; then
	    echo ">>> - for bzip support, install the 'bzip2' package."
	fi
    fi

}

post_upgrade() {
    post_install $1
}

op=$1
shift
$op $*
