From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7202 invoked by uid 1002); 20 Jun 2003 13:47:03 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 10809 invoked from network); 20 Jun 2003 13:47:03 -0000 From: Philippe =?ISO-8859-1?Q?Lafoucri=E8re?= Reply-To: lafou@wanadoo.fr To: Gentoo-dev Content-Type: multipart/mixed; boundary="=-C/Xgvn9gIzev8DEAJMnG" Organization: InFuzzion Message-Id: <1056116821.32688.160.camel@biproc> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4- Date: 20 Jun 2003 15:47:01 +0200 Subject: [gentoo-dev] Shell script help - emerge frontend. X-Archives-Salt: 59b1c14a-2601-49a2-a0a7-c1af2b7d5856 X-Archives-Hash: b05ea3e76d361a7ac94c8ef432002c60 --=-C/Xgvn9gIzev8DEAJMnG Content-Type: text/plain Content-Transfer-Encoding: 7bit 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.) --=-C/Xgvn9gIzev8DEAJMnG Content-Disposition: attachment; filename=dia-emerge.sh Content-Type: text/x-sh; name=dia-emerge.sh; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit #! /bin/sh # Front end to emerge and portage (gentoo Linux) using dialog. # Philippe Lafoucrière - 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 # --=-C/Xgvn9gIzev8DEAJMnG Content-Type: text/plain; charset=us-ascii -- gentoo-dev@gentoo.org mailing list --=-C/Xgvn9gIzev8DEAJMnG--