#!/bin/sh # Copyright 2003 Slackware Linux, Inc., Concord, CA USA # Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Moodified by Didier Spaier for Slint. export TEXTDOMAIN=slint . gettext.sh TMP=/var/log/setup/tmp errorcode() { if [ $1 = 99 ]; then # User aborted installation exit 1 else ArG1=$1 ArG2=$2 dialog --timeout 600 --title "`eval_gettext "installpkg error #\\\$ArG1"`" --msgbox \ "`eval_gettext "There was a fatal error attempting to install \\\$ArG2. The package may \ be corrupt, the installation media may be bad, one of the target \ drives may be full, or something else \ has caused the package to be unable to be read without error. You \ may hit enter to continue if you wish, but if this is an important \ required package then your installation may not work as-is."`" 11 80 fi } # /* main */ # Process command line: if [ $# -gt 0 ]; then # there are arguments to the command while [ $# -gt 0 ]; do case "$1" in "--srcpath") SRCPATH=`echo $2` ; shift 2 ;; "--mountpoint") MOUNTPOINT=`echo $2` ; shift 2 ;; "--target") ROOTDIR=`echo $2` ; shift 2 ;; "--device") DEVICE=`echo $2` ; shift 2 ;; "--net") REMOTESVR=`echo $2` ; shift 2 ;; *) ArG1=$1 eval_gettext "Unrecognized option \$ArG1" ; echo; shift 1 ;; esac done else exit 1; fi # Install the packages ( cd $SRCPATH Liste="aaa_base \ aaa_elflibs \ aaa_terminfo \ coreutils \ etc- \ glibc-solibs \ glibc-zoneinfo" for i in $Liste; do package=$(find -name "${i}*t?z") first="$first $package" if [ -f ${package%t?z}desc ]; then sed -n "1p" ${package%t?z}desc elif [ -f ${package%t?z}txt ]; then sed -n "1{s/[^:]\{1,\}://;p}" ${package%t?z}txt else echo "${package%.t?z} (no available description)" fi installpkg --root $ROOTDIR $package 1>/dev/null done for package in $(find -name "*t?z"); do if printf "$first"|grep "$package" 1>/dev/null; then continue fi if printf $package|grep "locales/" 1>/dev/null; then continue fi # Install the package with terse description if [ -f ${package%t?z}desc ]; then sed -n "1p" ${package%t?z}desc elif [ -f ${package%t?z}txt ]; then sed -n "1{s/[^:]\{1,\}://;p}" ${package%t?z}txt else echo "${package%.t?z} (no available description)" fi spkg -i --root=$ROOTDIR -qq --no-ldconfig --no-gtk-update-icon-cache $package ERROR=$? if [ ! $ERROR = 0 ]; then errorcode $ERROR $package fi done )