#!/bin/bash
SOURCE="$0"
source /usr/lib/elive-tools/functions
EL_REPORTS="1"
el_make_environment
. gettext.sh
TEXTDOMAIN="applications-compatibility"
export TEXTDOMAIN


main(){
    # pre {{{
    local args
    args="$@"

    # }}}
    # messages {{{
    local message_live
    message_live="$( printf "$( eval_gettext "Installing Steam takes a good amount of size in your memory, this can block your Live session. Do you want to continue?" )"  )"

    local message_installing
    message_installing="$( printf "$( eval_gettext "You are going to install the Steam Game Platform. Continue?" )"  )"

    # - messages }}}

    if grep -qs "boot=live" /proc/cmdline ; then
        # live mode, install elive first
        if ! $guitool --question --text="$message_live" ; then
            exit
        fi
    fi

    if $guitool --question --text="$message_installing" ; then
        if [[ "$( el_architecture host )" = "amd64" ]] ; then
            if ! dpkg --print-foreign-architectures | grep -qs "i386" ; then
                el_sudo dpkg --add-architecture i386
            fi
        fi

        el_dependencies_install "steam-installer"
    fi

}

#
#  MAIN
#
main "$@"

# vim: set foldmethod=marker :
