--- 2003-04-25-07/mozilla-linux-setup Fri Apr 25 07:10:48 2003 +++ latest/mozilla-linux-setup Sat May 3 09:58:01 2003 @@ -1,6 +1,6 @@ #!/bin/bash appname=`basename "$0"` - ver="0.3.5a.2003041017" + ver="0.3.5a.2003050309" copy="2002, 2003" mail="PointedEars@gmx.de" mail_feedback="bug-mozilla@PointedEars.de" @@ -34,10 +34,15 @@ mail_feedback="bug-mozilla@PointedEars.d # Enhancements: # # * Basic setup - # - Show build type and ID before install + # - `-D', `--download': + # Defines the resource from where to download the gzipped tarball first + # (uses wget). The file is downloaded to the location specified by SOURCE. + # - Show $distribution`/'build_type`/'$build_ID before install # - Show $installer and `rm' output (incl. stderr) after "done"/"failed" # - Show free disk space on /tmp before asking for clean-up, uses -h option # if supported + # * Plugin import + # - Show verbose output of import of all plugins only in verbose mode # * XUL applications setup # - Uninstall as described under # http://white.sakura.ne.jp/~piro/xul/doc/installation.html.en#uninstall; @@ -47,6 +52,13 @@ mail_feedback="bug-mozilla@PointedEars.d # with XUL apps (such as `mozgest') # * Allow repair of an existing installation, removing XUL cache file # * Approaching POSIX conformance: Order of options does not matter any longer + # * `-T', `--truetype': + # Modifies /usr/local/mozilla/defaults/pref/unix.js to use FreeType2 for + # TrueType fonts. The directory /usr/X11R6/lib/X11/fonts/truetype is then + # used by default, other font directories must be specified with the + # `pref("font.directory.truetype.X", )' statement in unix.js or the + # `user_pref(...)' statement in ~/.mozilla/...slt/unix.js; + # See http://www.mozilla.org/projects/fonts/unix/enabling_truetype.html # * Cosmetics # - Removed unused code (previously imported completely # from /etc/rc.status) @@ -62,14 +74,17 @@ mail_feedback="bug-mozilla@PointedEars.d # (with `\' and/or LF) to make it easier legible on # the console # - Workaround kate's imperfect color coding with a bunch of `# `' - # (post complains at kate.kde.org) + # (send your complaints to kate.kde.org!) # # Bugfixes: # + # * Basic setup + # - Working directory is current directory, not script directory # * XUL applications setup # - Removed duplicate status message ("not found") # - Fixed bug caused by "wrong" `pwd' when using the installer # - Fixed `$installler' typo in clean-up + # - Fixed `pwd` bug for absolute paths # * Cosmetics # - s/Protected/Distributed/ # - Use case...esac instead of if...elif...else whereever possible @@ -79,8 +94,7 @@ mail_feedback="bug-mozilla@PointedEars.d # # TO DO: # - # * Basic setup: - # - Working directory is current directory, not script directory + # * Basic setup # - Accept installer binary and skip extraction # * POSIX conform parsing of options and arguments (incomplete) # * Plugin import @@ -103,15 +117,6 @@ mail_feedback="bug-mozilla@PointedEars.d # * L10n: English and German (incomplete) # * Optimize portability: Does this require `bash' or would `sh' suffice? # (to be tested on IRIX 6.5) - # * `-D', `--download': - # Define the resource from where to download the gzipped tarball first - # (use wget). The file is downloaded to the location specified by SOURCE. - # * `-T', `--truetype': - # Modifies /usr/local/mozilla/defaults/pref/unix.js to use FreeType2 for - # TrueType fonts. The directory /usr/X11R6/lib/X11/fonts/truetype is then - # used by default, other font directories must be specified with the - # `pref("font.directory.truetype.X", )' statement in unix.js or the - # `user_pref(...)' statement in ~/.mozilla/...slt/unix.js # * `-C', `--clean-up': # Removes the previously extracted mozilla installer directory # * Cosmetics: @@ -129,16 +134,18 @@ function L { } function help { + future=${extd}`L "For future use" "Für zukünftige Verwendung"`.${norm} echo -n " ${extd}${appname}${norm} - [${extd}-?${norm}] [${extd}-v${norm}] \ + [${extd}-h${norm}] [${extd}-v${norm}] \ [${extd}-L${norm} LOCALE] [${extd}-I${norm} INSTALLER] [${extd}-U${norm} \ - [USER]] [${extd}-R${norm}] [${extd}-D${norm} RESOURCE] - [( ${extd}-c${norm} | ${extd}-s${norm} | ${extd}-h${norm} ) SOURCE \ - [PLUGIN_DIR] [...] [${extd}-0o${norm}]] - [${extd}-f${norm} [PLUGIN_DIR] [INST_PATH] [TGZ_PATH]] - [( ${extd}-i${norm} | ${extd}-u${norm} ) [APP_NAME] [...]] [${extd}-d${norm} [MOZ_DIR]] - SOURCE [TARGET] + [USER]] [${extd}-R${norm}] [${extd}-D${norm} [RESOURCE]] + [${extd}-d${norm} MOZ_DIR] [${extd}-T${norm} [TT_DIR]] \ + [( ${extd}-c${norm} | ${extd}-s${norm} | ${extd}-l${norm} ) SOURCE \ + [PLUGIN_DIR] [...] + [${extd}-0o${norm}]] [${extd}-f${norm} [PLUGIN_DIR] [INST_PATH] [TGZ_PATH]] \ + [( ${extd}-i${norm} | ${extd}-u${norm} ) [APP_NAME]] + [...] SOURCE [TARGET] ${extd}-h${norm}, ${extd}--help${norm} " L "Show this help and exit." \ @@ -181,7 +188,8 @@ ${extd}`L "BASIC SETUP" \ ${extd}${appname}${norm} [...] [${extd}-I${norm} INSTALLER] [${extd}-U${norm} [USER]] \ - [${extd}-R${norm}] [${extd}-D${norm} RESOURCE] SOURCE [TARGET] [...] + [${extd}-R${norm}] [${extd}-D${norm} RESOURCE] [${extd}-d${norm} MOZ_DIR] + [${extd}-T${norm} [TT_DIR]] SOURCE [TARGET] [...] ${extd}-I${norm}, ${extd}--installer${norm} " L "Use the installer program specified by INSTALLER." \ @@ -221,7 +229,7 @@ L "Do a single-user install. The default verwendet wird, so wird die Reparatur nur für einen Benutzer durchgeführt, anderenfalls für alle \ Benutzer." | $fmt - L " ${extd}For future use.${norm}" \ + L " $future" \ " ${extd}Für zukünftige Verwendung.${norm}" | $fmt echo -n " USER " L "The name of the user whose installation should be" \ @@ -250,7 +258,7 @@ L "Terminate all Mozilla processes and r (Themes-Einstellungen) und localstore.rdf (Fenster-Einstellungen) aus den Profilverzeichnissen, damit sie beim nächsten Mozilla-Start neu erstellt - werden. (Schreibrechte erforderlich!) + werden. (Schreibrechte erforderlich!) Wie in der Newsgroup de.comm.software.mozilla und auf http://www.hmetzger.de/Profilverzeichnisse.html diskutiert, verursachen ungültige Daten in diesen @@ -267,14 +275,42 @@ L "Terminate all Mozilla processes and r gesendet und Benutzer werden nicht gespeicherte Daten verlieren!" | $fmt echo -n " ${extd}-D${norm}, ${extd}--download${norm} " - L "Download \`mozilla-installer' archive from" \ - "Archiv mit \`mozilla-installer' vor dem Entpacken" | $fold + L "Download Seamonkey installer archive from" \ + "Archiv mit Seamonkey-Installer vor dem Entpacken" | $fold L "\ RESOURCE to SOURCE before extracting it. - ${extd}For future use.${norm}" \ + RESOURCE If this argument is left out, the default + \`http://ftp.mozilla.org/pub/mozilla/nightly/latest/ + mozilla-i686-pc-linux-gnu-sea.tar.gz' is used, which + downloads and installs the latest Mozilla Nightly Build. + The default value can be overwritten defining the + \`MOZILLA_URI' environment. $future" \ "\ von RESOURCE nach SOURCE herunterladen. - ${extd}Für zukünftige Verwendung.${norm}" | $fmt + RESOURCE Wird dieses Argument nicht angegeben, so wird der + Standardwert \`http://ftp.mozilla.org/pub/mozilla/ + nightly/latest/mozilla-i686-pc-linux-gnu-sea.tar.gz' + verwendet, wodurch das neueste Nightly Build von + Mozilla heruntergeladen und installiert wird. + Der Standardwert kann durch Definition der + Umgebungsvariablen \`MOZILLA_URI' überschrieben werden. + $future" | $fmt + echo "\ + ${extd}-d${norm}, ${extd}--directory${norm} Specify user-defined Mozilla \ + directory. If left out, + the default (/usr/local/mozilla/) will be used. + $future + MOZ_DIR User-defined Mozilla directory. + ${extd}-T${norm}, ${extd}--truetype${norm} Configure Mozilla (not) to use \ + FreeType2 for TrueType font + support. $future + TT_DIR A list of directories where to search for TrueType font + files. With all arguments of \`${extd}-T${norm}', you \ + may specify up + to 3 directories separated by space. Use \`-' to specify + the default directory /usr/X11R6/lib/X11/fonts/truetype. + Duplicates are not ignored. Leave this argument out to + disable FreeType2 and TrueType support explicitly." echo -n " SOURCE " L "\`mozilla-installer' archive path. Required." \ "Pfad für Archiv mit \`mozilla-installer'. Erforderlich." | $fold @@ -308,7 +344,7 @@ L "User-defined directory where to store das Standardverzeichnis (/tmp) verwendet. (Schreibrechte für das angegebene Verzeichnis werden zwingend benötigt!)" | $fmt echo -n " - ${extd}`L "PLUGIN AND ADD-ON SETUP" "INSTALLLATION VON PLUGINS UND \ + ${extd}`L "PLUGIN AND ADD-ON SETUP" "INSTALLATION VON PLUGINS UND \ ADD-ONS"`${norm} ${extd}${appname}${norm} @@ -396,7 +432,7 @@ L "\ or not very older versions of Mozilla than you are setting up as files of much older versions and of Netscape are likely to be incompatible. - ${extd}For future use.${norm}" \ + $future" \ "\ plugin that \"handles plugin data for mimetypes and extensions that are not specified and facilitates @@ -404,11 +440,11 @@ L "\ CAUTION! This should only be used with newer or not very older versions of Mozilla than you are setting up as files of much older versions and of Netscape are likely - to be incompatible. ${extd}For future use.${norm}" | $fmt + to be incompatible. $future" | $fmt echo -n " ${extd}-o${norm}, ${extd}--overwrite${norm} " L "Overwrite existing plugins. The default is not to" | $fold L "\ - overwrite. ${extd}For future use.${norm}" | $fmt + overwrite. $future" | $fmt echo -n " ${extd}-f${norm}, ${extd}--flash${norm} " L "Install Flash plugin using PE's Flash Plugin Installer." \ "Install Flash plugin using PE's Flash Plugin Installer." | $fold @@ -430,7 +466,7 @@ L "\ contain the plugin files. Use \`-' or leave this out for the default (install_flash_player_6_linux). Requires Flash Plugin Installer 0.2.3b or newer to have effect. - ${extd}For future use.${norm} + $future ${extd}-a${norm}, ${extd}--apps${norm} Same as \`-i'. ${extd}-i${norm}, ${extd}--install${norm} Install plugins and XUL \ applications from @@ -450,11 +486,6 @@ applications from \`file.xpi' if \`file' does not exist. For uninstall, a backup of chrome/installed-chrome.txt will be created as chrome/installed-chrome.txt.bak file. - ${extd}-d${norm}, ${extd}--directory${norm} Specify user-defined Mozilla \ - directory. If left out, - the default (/usr/local/mozilla/) will be used. - ${extd}For future use.${norm} - MOZ_DIR User-defined Mozilla directory. ${extd}EXIT CODES${norm} @@ -477,7 +508,7 @@ function PluginImport { echo "${extd}Plugin import${norm}" local defaultImportSource="/usr/local/netscape/plugins" local defaultImportTarget="/usr/local/mozilla/plugins" - + test $verbose -eq 1 && echo "copy=$copy" if [ $copy -eq 1 ]; then echo " @@ -500,10 +531,15 @@ Copying plugins..." echo -n " checking for source path... " if [ -d "$importSource" ]; then echo "directory: $importSource" - echo " copying all plugins..." + echo -n " copying all plugins... " for j in `ls $importSource/`; do if [ "$j" != "libnullplugin.so" ]; then - cp -apv $importSource/$j $importTarget + if [ $verbose -eq 1 ]; then + echo + cp -apv $importSource/$j $importTarget + else + cp -ap $importSource/$j $importTarget + fi fi done if [ $? -ne 0 ]; then @@ -552,10 +588,15 @@ Symlinking plugins..." echo -n " checking for source path... " if [ -d "$importSource" ]; then echo "directory: $importSource" - echo " creating symbolic links for all plugins..." + echo -n " creating symbolic links for all plugins... " for j in `ls $importSource/`; do if [ "$j" != "libnullplugin.so" ]; then - cp -asv $importSource/* $importTarget + if [ $verbose -eq 1 ]; then + echo + cp -asv $importSource/* $importTarget + else + cp -as $importSource/* $importTarget + fi fi done if [ $? -ne 0 ]; then @@ -604,10 +645,15 @@ Hardlinking plugins..." echo -n " checking for source path... " if [ -d "$importSource" ]; then echo "directory: $importSource" - echo " creating hard links for all plugins..." + echo -n " creating hard links for all plugins... " for j in `ls $importSource/`; do if [ "$j" != "libnullplugin.so" ]; then - cp -lapv $importSource/* $importTarget + if [ $verbose -eq 1 ]; then + echo + cp -lapv $importSource/* $importTarget + else + cp -lap $importSource/* $importTarget + fi fi done if [ $? -ne 0 ]; then @@ -827,7 +873,7 @@ function XULuninst { } function isMozRunning { - # check for supported `ps' options + # check for supported `ps' options # BSD style user-oriented args="u " ps $args 1>/dev/null 2>&1 @@ -875,10 +921,12 @@ function XPInst { # $i is already installed. Performing automagic uninstall first... " # XULuninst "$i" # fi + local d="`pwd`/" + test "`echo "$f" | cut -c 1 2>/dev/null`" = "/" && d="" # if isMozRunning && mozilla -remote 'ping()' 2>/dev/null ; then - # mozilla -remote 'openURL(file://'`pwd`'/$f)' + # mozilla -remote 'openURL(file://$d$f)' # else - mozilla "file://`pwd`/$f" # & + mozilla "file://$d$f" # & # fi if [ $? -eq 0 ]; then echo "$rc_done" @@ -893,14 +941,14 @@ function XPInst { function XULsetup { echo " ${extd}XUL applications and cross-platform installation setup${norm}" - + if [ $uninst -eq 1 ]; then echo " Uninstalling XUL applications (${extd}is currently tested${norm})... " XULuninst "$uninstList" fi - + if [ $inst -eq 1 ]; then echo " Installing XPIs. You need to quit Mozilla after each installation. @@ -918,7 +966,7 @@ function MozRepairFiles { test $verbose -eq 1 && echo "$rc_done" else test $verbose -eq 1 && echo "$rc_failed" - let result++; + let result++ fi done test $verbose -eq 1 -a $result -gt 0 && \ @@ -948,6 +996,43 @@ ${extd}`L "Repair of an existing install fi } + function EnableTrueType { + echo " + + ${extd}`L "TrueType font support" \ + "Unterstützung für TrueType-Schriftarten"`${norm} + " + KillMoz + + local prefdir=$mozdir/defaults/pref + fontdirs=("/usr/X11R6/lib/X11/fonts/truetype" "" "") + test -n "$1" -a "$1" != "-" && fontdirs[0]="$1" + test -n "$2" -a "$2" != "-" && fontdirs[1]="$2" + test -n "$3" && fontdirs[2]="$3" + + echo "`L Directories: Verzeichnisse:` + " + for i in ${fontdirs[*]}; do + test -n "$i" && echo " $i" + done + + cp -p $prefdir/unix.js $prefdir/unix.js.bak \ + && sed 's%\(pref("font.FreeType2.enable", \+\)false%\1true%' $prefdir/unix.js.bak \ + | sed 's%^\(//\)* *\(pref("font.directory.truetype.1", \+"\).*"%\2'${fontdirs[0]}'"%' \ + | sed 's%^\(//\)* *\(pref("font.directory.truetype.2", \+"\).*"%\2'${fontdirs[1]}'"%' \ + | sed 's%^\(//\)* *\(pref("font.directory.truetype.3", \+"\).*"%\2'${fontdirs[2]}'"%' \ + > $prefdir/unix.js + + test $verbose -eq 1 && less $prefdir/unix.js + + echo + if [ $? -eq 0 ]; then + echo $rc_done + else + echo $rc_failed + fi + } + function UpdPerm { # Make XUL apps available to all users echo -n "`L "Updating access permissions" \ @@ -1027,10 +1112,10 @@ if test "$TERM" != "raw" && stty size >/ esc=`echo -en "\033"` extd="${esc}[1m" warn="${esc}[1;31m" - done="${esc}[1m" + done="${esc}[1;32m" attn="${esc}[1m" norm=`echo -en "${esc}[m\017"` - stat=`echo -en "\015${esc}[${COLUMNS}C${esc}[14D "` + stat=`echo -en "\015${esc}[${COLUMNS}C${esc}[13D"` else esc="" extd="" @@ -1042,33 +1127,33 @@ else fi # check for fold - fold="fold -sw $COLUMNS" - chk=`which fold 2> /dev/null` - test $? -ne 0 && fold="cat" - chk=`echo x | $fold 1> /dev/null` - test -n "$chk" && fold="cat" + fold="fold -sw $COLUMNS" + chk=`which fold 2> /dev/null` + test $? -ne 0 && fold="cat" + chk=`echo x | $fold 1> /dev/null` + test -n "$chk" && fold="cat" # check for fmt - fmt=cat - if [ $COLUMNS -ne 80 ]; then # output is preformatted for 80 cols - chk=`which fmt 2> /dev/null` - if [ $? -ne 0 ]; then - fmt=$fold + fmt=cat + if [ $COLUMNS -ne 80 ]; then # output is preformatted for 80 cols + chk=`which fmt 2> /dev/null` + if [ $? -ne 0 ]; then + fmt=$fold + else + # check for columns + fmt="fmt -$COLUMNS" + chk=`echo x | $fmt 2> /dev/null` + test -z "$chk" && fmt="fmt" + # check for -c|--crown-margin + chk=`echo x | $fmt -c 2> /dev/null` + if [ -n "$chk" ]; then + fmt=$fmt" -c" else - # check for columns - fmt="fmt -$COLUMNS" - chk=`echo x | $fmt 2> /dev/null` - test -z "$chk" && fmt="fmt" - # check for -c|--crown-margin - chk=`echo x | $fmt -c 2> /dev/null` - if [ -n "$chk" ]; then - fmt=$fmt" -c" - else - chk=`echo x | $fmt --crown-margin 2> /dev/null` - test -n "$chk" && fmt=$fmt" --crown-margin" - fi + chk=`echo x | $fmt --crown-margin 2> /dev/null` + test -n "$chk" && fmt=$fmt" --crown-margin" fi fi + fi echo " ${extd}Mozilla Setup Wizard for GNU/Linux $ver${norm} @@ -1081,6 +1166,8 @@ test -z "$1" && help=1 # Flags and setup data verbose=0 + download_default="http://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-i686-pc-linux-gnu-sea.tar.gz" + download="" repair=0 single=0 src="" @@ -1104,38 +1191,47 @@ inst=0 instList="" uninst=0 uninstList="" + truetype=0 + truetype_dirs=() last="" while [ -n "$1" ]; do case "$1" in - "-?" | --help) help=1;; - -v | --verbose) + -h | --help) + help=1;; + -v | --verbose) last="" verbose=1 echo echo "${extd}Working in verbose mode.${norm} \$* = \"$*\" ";; - -L | --locale) last="L";; - -R | --repair) last=""; repair=1;; - -I | --installer) last="I";; - -U | --single-user) last=""; single=1;; - -0 | --null) last=""; importNull=1;; - -O | -o | --overwrite) last=""; overwrite=1;; - -C | -c | --copy) last="c"; import=1; copy=1; let copyOptLast+=1;; - -S | -s | --symlinks) last="s"; import=1; link=1; let linkOptLast+=1;; - -H | -h | --hardlinks) last="h"; import=1; hard=1; let hardOptLast+=1;; - -F | -f | --flash) last="f"; flash=1; flashPluginDir="" + -L | --locale) last="L";; + -D | --download) last="D" + download=$download_default;; + -R | --repair) last=""; repair=1;; + -I | --installer) last="I";; + -U | --single-user) last=""; single=1;; + -0 | --null) last=""; importNull=1;; + -O | -o | --overwrite) last=""; overwrite=1;; + -C | -c | --copy) last="c"; import=1; copy=1; let copyOptLast+=1;; + -S | -s | --symlinks) last="s"; import=1; link=1; let linkOptLast+=1;; + -l | --link) last="l"; import=1; hard=1; let hardOptLast+=1;; + -F | -f | --flash) last="f"; flash=1; flashPluginDir="" flashInstPath="";; - -A | -a | --apps | -i | --install) + -A | -a | --apps | -i | --install) last="i"; inst=1;; - -u | --uninstall) last="u"; uninst=1;; + -u | --uninstall) last="u"; uninst=1;; + -T | --truetype) truetype=1; last="T";; *) if [ -n "$last" ]; then case $last in L) lg=$1 last="";; + D) + download="$1" + last="";; I) installer=$1 last="";; @@ -1153,7 +1249,7 @@ while [ -n "$1" ]; do linkOpt[$linkOptLast]="${linkOpt[$linkOptLast]} $1" last="" fi;; - h) + l) if [ -z "${hardOpt[$hardOptLast]}" ]; then hardOpt[$hardOptLast]=$1 else @@ -1173,6 +1269,11 @@ while [ -n "$1" ]; do u) test -n "$uninstList" && uninstList="$uninstList " uninstList="$uninstList$1";; + T) + for i in $1; do + truetype_dirs[${#truetype_dirs[*]}]="$i" + done + ;; esac else if [ -z "$src" ]; then @@ -1197,7 +1298,12 @@ rc_failed_up="${esc}[1A${rc_failed}" test -z "$src" && src="-" test -z "$target" && target="-" if [ $verbose -eq 1 ]; then - echo "src=\"$src\" + echo "\ + download_default=\"$download_default\" + download=\"$download\" + repair=$repair + single=$single + src=\"$src\" target=\"$target\" installer=\"$installer\"" fi @@ -1262,7 +1368,7 @@ echo if [ "$src" = "0" ]; then echo `L "Skipped" "Übergangen"`. else - echo -n "`L 'checking for tar... ' 'überprüfe auf tar... '`" + echo -n "`L 'checking for tar... ' 'Überprüfe tar... '`" chk=`which tar 2> /dev/null` if [ $? -eq 0 ]; then echo "`tar --version | head -n 1 -` ($chk)" @@ -1274,7 +1380,7 @@ the archive." >&2 exit 2 fi - echo -n "`L 'checking for gzip... ' 'überprüfe auf gzip... '`" + echo -n "`L 'checking for gzip... ' 'Überprüfe gzip... '`" chk=`which gzip 2> /dev/null` if [ $? -eq 0 ]; then echo "`gzip --version | head -n 1 -` ($chk)" @@ -1286,13 +1392,38 @@ the archive." >&2 exit 3 fi - echo -n "`L 'checking for source path... ' 'überprüfe Quellpfad... '`" - if [ "$src" = "-" ]; then - src=`dirname $0` - fi + test "$src" = "-" && src=`pwd` + + test -n "$download" && { + if [ -d "$src" ]; then + src2="-P $src" + else + src2="-O $src" + fi + test "$download" = "-" && download=$download_default + echo -n "`L "downloading archive from $download... " \ + "Archiv wird von $download heruntergeladen... "`" | $fold + if [ $verbose -eq 1 ]; then + echo + wget "$download" $src2 + else + wget_out=`wget "$download" $src2 2>&1` + fi + if [ $? -ne 0 ]; then + echo "$rc_failed + " + test $verbose -eq 0 && echo "$wget_out" + echo + exit 6 + else + echo $rc_done + fi + } + + echo -n "`L 'checking for source path... ' 'Überprüfe Quellpfad... '`" if [ -d "$src" ]; then echo "`L directory Verzeichnis`: $src" | fold -s - echo -n "`L 'checking for archive... ' 'überprüfe Archiv... '`" + echo -n "`L 'checking for archive... ' 'Überprüfe Archiv... '`" srcf=`(ls -1vr $src/mozilla*pc-linux*sea.t*gz 2> /dev/null) | head -n 1 -` if [ -n "$srcf" ]; then echo "$srcf" @@ -1303,8 +1434,8 @@ the archive." >&2 exit 4 fi else - echo "file: $src" - echo -n "`L 'checking for archive... ' 'überprüfe Archiv... '`" + echo "`L file Datei`: $src" + echo -n "`L 'checking for archive... ' 'Überprüfe Archiv... '`" if [ -f "$src" ]; then echo $rc_done else @@ -1314,18 +1445,20 @@ the archive." >&2 fi fi - echo -n "checking for target directory... " + echo -n "`L 'checking for target directory... ' \ + 'Überprüfe Zielverzeichnis... '`" if [ "$target" = "-" ]; then target="/tmp" fi if [ -d "$target" ]; then echo $target + echo -n "`L 'extracting files... ' \ + 'Archiv wird entpackt... '`" if [ $verbose -eq 1 ]; then - echo "extracting files..." + echo tar xvzf $src -C $target else - echo -n "extracting files... " tar_out=`tar xvzf $src -C $target 2>&1` fi if [ $? -ne 0 ]; then @@ -1337,16 +1470,21 @@ the archive." >&2 else echo $rc_done fi - echo -n "checking for $installer... " + echo -n "`L "checking for $installer... " \ + "Überprüfe $installer... "`" if [ -f "$target/$installer/$installer" ] \ && [ -x "$target/$installer/$installer" ]; then echo $rc_done KillMoz - echo -n " - Installing `grep mozilla/ $target/$installer/config.ini | uniq | \ - sed 's%.*mozilla/\(.*\)/linux-xpi/%\1%'`. - Waiting for \`$installer' to finish - (close all Mozilla windows to continue!)... " + echo + moz_ver=`grep pub/ $target/$installer/config.ini | uniq | \ + sed 's%.*/pub/\(.*\)/linux-xpi/%\1%'` + test -n "$moz_ver" && echo "`L "Installing $moz_ver" \ + "Installiert wird $moz_ver"`." + echo -n "$(L "Waiting for \`$installer' to finish + (close all Mozilla windows to continue!)... " \ + "Warte auf \`$installer' + (zum Fortsetzen alle Mozilla-Fenster schliessen!)... ")" # ` # save current working directory before changing it (fixes XPI setup bug) @@ -1375,13 +1513,14 @@ $out " fi answer="0" - while [ "$answer" != "y" ] && [ "$answer" != "n" ]; do - read -p "Clean up NOW ([y]es | [n]o | [i]nfo)? " -n 1 answer + while [ "$answer" != "`L y j`" ] && [ "$answer" != "n" ]; do + read -p "`L 'Clean up NOW ([y]es | [n]o | [i]nfo)?' \ + 'JETZT aufräumen ([j]a | [n]ein | [i]nfo)?'` " -n 1 answer echo case "$answer" in - y) + `L y j`) echo - echo -n "cleaning up... " + echo -n "`L 'cleaning up' 'Aufräumen'`... " # up one directory before removal (secure method) cd .. @@ -1399,26 +1538,32 @@ $out n) echo " -------------------------------------------------------------------- - OK. If not needed anymore, you should + `L 'OK. If not needed anymore, you should' 'OK. Wenn nicht länger benötigt, \ + sollten Sie'` rm -r $target/$installer - to free disk space. + `L 'to free disk space.' 'ausführen, um Speicherplatz freizugeben.'` --------------------------------------------------------------------" break;; i) echo " -------------------------------------------------------------------- - \"Yes\" means that the setup directory extracted from the archive will + `L "\\"Yes\\" means that the setup directory extracted from the archive will be removed to free disk space. - \"No\" keeps the setup files and allows you to reinstall Mozilla with + \\"No\\" keeps the setup files and allows you to reinstall Mozilla with" \ + "\\"Ja\\" bedeutet, dass das aus dem Archiv entpackte Setup-Verzeichnis + entfernt wird, um Speicherplatz freizugeben. + + \\"Nein\\" belässt die Setup-Dateien an ihrer Position, was es Ihnen + gestattet, Mozilla mit"` $target/$installer/$installer - if something goes wrong. + `L "if something goes wrong." "neu zu installieren, falls es Probleme gibt."` -------------------------------------------------------------------- - " | $fmt + " | $fold ;; esac done @@ -1453,6 +1598,7 @@ test $flash -eq 1 && FlashSetup mozdir=/usr/local/mozilla test $uninst -eq 1 -o $inst -eq 1 && XULsetup + test $truetype -eq 1 && EnableTrueType ${truetype_dirs[@]} test $repair -eq 1 && MozRepair echo "