public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Shell script help - emerge frontend.
@ 2003-06-20 13:47 Philippe Lafoucrière
  2003-06-20 15:20 ` Michael Kohl
  0 siblings, 1 reply; 16+ messages in thread
From: Philippe Lafoucrière @ 2003-06-20 13:47 UTC (permalink / raw
  To: Gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

Hello

Last month, I took a look at FreeBSD which really surprised me. However,
gentoo rocks so much I can't give it up. I started yesterday to create a
shell script that would help newbies with Gentoo, and especially
PORTAGE.
This script would be very similar to /stand/sysinstall of Freebsd. Are
there some volonteers to work on it with me ? 

(script is attached, don't worry about filename.)


[-- Attachment #2: dia-emerge.sh --]
[-- Type: text/x-sh, Size: 1737 bytes --]

#! /bin/sh

# Front end to emerge and portage (gentoo Linux) using dialog.
# Philippe Lafoucrière <lafou@wanadoo.fr> - 2003
#
# This utility only use dialog so it can be used with a minimal installation.
#

VERSION="0.0.1"

#DIALOG=Xdialog
DIALOG="dialog"

PORTAGE_DIR="/usr/portage"

# Return codes used in this program:
E_SUCCESS=0
E_FAILURE=1


######### EMERGE_MENU #########
emerge_menu() {
    local RESULT=${E_FAILURE}
    local LIST=$(ls ${PORTAGE_DIR})
    local DLIST=
    for N in ${LIST} ; do
        DLIST="${DLIST} $N -"
    done
    CATEGORY=$(dialog --stdout \
            --backtitle "portage categories" \
             --menu "Choose category" 0 0 0\
             ${DLIST})
    RESULT=$?
    select_package_menu
}
######### EMERGE_MENU #########
select_package_menu() {
    local RESULT=${E_FAILURE}
    local LIST=$(ls ${PORTAGE_DIR}/${CATEGORY})
    local DLIST=

    for N in ${LIST} ; do
        DLIST="${DLIST} $N - "
    done
    PACKAGE=$(dialog --stdout \
            --backtitle "Packages in ${CATEGORY}" \
             --menu "Choose Package" 0 0 0\
             ${DLIST})
    RESULT=$?
    return ${RESULT}
}
######### EMERGE_MENU #########
conf_menu() {
    dialog --backtitle 'Configuration' \
    --msgbox "                  Not yet implemented" 5 60
}

######### INTRO #########
intro() {
    dialog --backtitle 'portage' \
    --msgbox "              Welcome to portage utilities" 5 60
}

######### MAIN #########
main_menu () {
    RESULT=$(dialog --stdout \
        --backtitle 'portage' --menu "Select a function" 10  60 0 \
        1   'Install package (emerge)' \
        2   'Configure portage')

    case $RESULT in
        1) emerge_menu;;
        2) conf_menu;;
    esac
}


intro
main_menu
#


[-- Attachment #3: Type: text/plain, Size: 37 bytes --]

--
gentoo-dev@gentoo.org mailing list

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-06-21 10:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-20 13:47 [gentoo-dev] Shell script help - emerge frontend Philippe Lafoucrière
2003-06-20 15:20 ` Michael Kohl
2003-06-20 16:06   ` Philippe Lafoucrière
2003-06-20 16:16     ` Philippe Lafoucrière
2003-06-20 16:56       ` Philippe Lafoucrière
2003-06-20 19:15     ` Svyatogor
2003-06-20 18:08       ` Philippe Lafoucrière
2003-06-20 20:24         ` bdharring
2003-06-20 20:31           ` Philippe Lafoucrière
     [not found]             ` <20030620231603.1aba32dd.genone@genone.homeip.net>
2003-06-20 21:32               ` Philippe Lafoucrière
2003-06-20 21:38                 ` bdharring
2003-06-20 21:50                   ` Thomas de Grenier de Latour
2003-06-20 22:38                   ` Marius Mauch
2003-06-20 21:33             ` bdharring
2003-06-21  3:52           ` Michael Kohl
2003-06-21 10:56     ` Michael Kohl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox