#!/bin/sh FONTS=" \ http://www.microsoft.com/typography/downloads/mtcom.exe \ http://www.microsoft.com/typography/downloads/webdings.exe \ http://www.microsoft.com/typography/downloads/trebuc.exe \ http://www.microsoft.com/typography/downloads/georgia.exe \ http://www.microsoft.com/typography/downloads/verdana.exe \ http://www.microsoft.com/typography/downloads/comic.exe \ http://www.microsoft.com/typography/downloads/ariblk.exe \ http://www.microsoft.com/typography/downloads/impact.exe \ http://msdownload.microsoft.com/msdownload/euro/31/en/WIN3EURO.EXE \ " if [ "`id -u`" != "0" ]; then echo "You must be root to use this program!" exit 0 fi echo echo "By continuing with this program you log on to the Microsoft(c)-Webserver." echo "Accepting the following Terms and conditions results in a contract between the" echo "user and Microsoft(c). Neither SuSE nor the vendor of this installation media" echo "is part of this contract. SuSE will not take any liability for the software" echo "which can be found on the Microsoft(c) Webserver." echo echo -n "Continue? [yes/NO] " read answer if test "$answer" != "yes"; then exit 0 fi mkdir -p /usr/X11R6/lib/X11/fonts/truetype/tmp cd /usr/X11R6/lib/X11/fonts/truetype/tmp for archive in $FONTS; do file=`echo $archive|awk -F "/" '{print $NF}'` if test "$file" = "WIN3EURO.EXE"; then LICENSE=LICENSE.TXT else LICENSE=README.TXT fi if test ! -f $file; then echo -n "Fetching $file ..." wget -q --passive $archive echo done unzip -v $file > /dev/null 2>&1 if test $? -ne 0; then rm -f $file echo "$file cannot be compressed ... deleted!" else echo -n "Extracting $file ..." unzip -q -o $file echo "done" less $LICENSE echo -n "Do you accept all of the terms of License Agreement of $file? [yes/NO] " read answer if test "$answer" == "yes"; then mv $LICENSE .. for i in *.TTF; do lower=`echo $i|tr [:upper:] [:lower:]` mv $i ../$lower done fi fi else unzip -t $file > /dev/null 2>&1 if test $? -ne 0; then rm -f $file echo -n "Fetching $file ..." wget -q --passive $archive echo done unzip -v $file > /dev/null 2>&1 if test $? -ne 0; then rm -f $file echo "$file cannot be compressed ... deleted!" else echo -n "Extracting $file ..." unzip -q -o $file echo "done" less $LICENSE echo -n "Do you accept all of the terms of License Agreement of $file? [yes/NO] " read answer if test "$answer" == "yes"; then mv $LICENSE .. for i in *.TTF; do lower=`echo $i|tr [:upper:] [:lower:]` mv $i ../$lower done fi fi else echo -n "Extracting $file ..." unzip -q -o $file echo "done" less $LICENSE echo -n "Do you accept all of the terms of License Agreement of $file? [yes/NO] " read answer if test "$answer" == "yes"; then mv $LICENSE .. for i in *.TTF; do lower=`echo $i|tr [:upper:] [:lower:]` mv $i ../$lower done fi fi fi done cd .. if test -x /usr/X11R6/bin/ttmkfdir; then echo -n "Creating fonts.scale ..." /usr/X11R6/bin/ttmkfdir|sed s/^[0-9]*// > fonts.scale.msttfonts echo "done" else echo "error: ttmkfdir (SuSE package ttmkfdir) is required to create fonts.scale!" exit 1 fi if test -x /usr/X11R6/bin/mkfontdir; then echo -n "Creating fonts.dir ..." echo 0 > fonts.scale ls fonts.scale.* &> /dev/null && cat fonts.scale.* >> fonts.scale /usr/X11R6/bin/mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings/large -e /usr/X11R6/lib/X11/fonts/encodings echo "done" else echo "error: mkfontdir is required to created fonts.dir!" exit 1 fi #rm -rf tmp