|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T i
Length: 4620 (0x120c)
Types: TextFile
Names: »install_fonts«
└─⟦6c4f54b10⟧ Bits:30000747 8mm tape, Rational 1000, ACCESS 0_8_0 INTERNAL RELEASE
└─⟦5d1d5404f⟧ »DATA«
└─⟦17d28fd8c⟧
└─⟦eb623852f⟧
└─⟦this⟧ »bin/install_fonts«
#! /bin/csh -f
# Figure out where the fonts are first
set argv0=$0
set rahome=$argv0:h
set raname=$argv0:t
if ($rahome == $raname) then
set rahome = ''
endif
if ($rahome =~ */bin) then
set rahome = $rahome:h
endif
set current_dir = $cwd
if ($current_dir =~ */bin) then
set current_dir = $current_dir:h
endif
if ($rahome =~ /*) then
setenv ACCESSHOME $rahome
else if ((-e ./bin/rational) || (-e ./rational)) then
setenv ACCESSHOME $current_dir
else if ((-e $rahome/bin/rational) || (-e $rahome/rational)) then
setenv ACCESSHOME $current_dir/$rahome
endif
set path=( /bin /usr/ucb $path )
set uname = `uname`
#
getpath1:
if (`which xset | awk '{print $1}'` == "no") then
echo "Unable to find xset, please provide the path for xset."
echo -n "xset path:"
set ANSWER=$<
set path=( $ANSWER $path )
goto getpath1
endif
#
getpath2:
if (`which xlsfonts | awk '{print $1}'` == "no") then
echo "Unable to find xlsfonts, please provide the path for xlsfonts."
echo -n "xlsfonts path:"
set ANSWER=$<
set path=( $ANSWER $path )
goto getpath2
endif
#
select:
echo "Choose one of the following directories to install the fonts:"
echo " "
echo "0 ) Choose 0 to specify a different directory."
if ( uname == "SunOS" ) then
set the_list = `xset -q | awk 'BEGIN { FS = ","; enable = 0 } enable == 1 { for (i = 1; i <= NF; i++) print $i; enable = 0 } $1 == "Font Path:" { enable = 1 }' | sed 's/^ *//g'`
else if ( uname == "AIX" ) then
set the_list = `xset -q | awk '$1 == "Font" { print $3 }' | awk 'BEGIN { FS = "," }; { for (i = 1; i <= NF; i++) print $i }'`
else
echo "Unsuported configuration."
exit
endif
endif
set count = 0
foreach item ( $the_list )
@ count++
echo $count ")" $item
end
echo " "
echo -n "Type the number that corresponds to one of the above choices: "
set ANSWER=$<
if ( ${ANSWER} == 0 ) then
echo " "
echo -n "Install fonts in directory:"
set font_dir=$<
endif
if ( ${ANSWER} > $count ) then
echo "Out of range choice, try again."
goto select
endif
set count = 0
foreach item ( $the_list )
@ count++
if ( $count == $ANSWER ) then
set font_dir = $item
endif
end
if ( -e $font_dir ) then
if ( -f $font_dir ) then
echo "$font_dir is a file. Delete the files or choose another"
echo "directory for the install."
goto select
endif
else
echo -n Directory $font_dir does not exist. Create one\?" "\[y\]" "
set ANSWER=$<
if ( ${ANSWER} == "" || ${ANSWER} == 'Y' || ${ANSWER} == 'y' ) then
if ( uname == "SunOS" ) mkdir -p $font_dir
else mkdir $font_dir
if ( ! -e $font_dir ) then
echo "Unable to create directory. Create directory manually and"
echo "rerun the install script."
exit
endif
else
echo "Please choose a different directory to install fonts."
goto select
endif
endif
echo "Installing fonts in "$font_dir
cd $ACCESSHOME/fonts
set fonts_for = 0
if ( ! -e ${font_dir}/fonts.dir ) then
if ( ! -e ${font_dir}/Families.list ) then
if ( uname == "AIX" ) then
set fonts_for = 1
else
echo -n "Install fonts for openlook or motif? "\[o\]" "
set ANSWER=$<
if ( ${ANSWER} == "m" || ${ANSWER} == "M" ) then
set fonts_for = 1
else
set fonts_for = 2
endif
endif
endif
endif
# Installing fonts for Motif
if ( -e ${font_dir}/fonts.dir || ${fonts_for} == 1 ) then
foreach bdf ( `ls *.bdf` )
set snf = `echo ${bdf} | sed 's/\.bdf/.snf/g'`
echo ${bdf} '=>' ${font_dir}/${snf}
bdftosnf -t ${bdf} > ${font_dir}/${snf}
end
cd $font_dir
if ( -e fonts.dir ) then
mv fonts.dir fonts.dir.`date | sed -e 's/ /-/g'`
endif
mkfontdir .
if ( ${fonts_for} == 1 ) then
xset fp+ $font_dir
endif
xset fp rehash
endif
# Installing fonts for Openlook
if ( -e ${font_dir}/Families.list || ${fonts_for} == 2 ) then
foreach bdf ( `ls *.bdf` )
dumpfont -f 200 -d $font_dir $bdf
end
cd $font_dir
rm -f *.ff
echo "Ignore errors such as: (Encoding: Unknown) and (cat: ./Compat.list:..)"
bldfamily -f 40 | tee bldfamily.log | fgrep fixed
echo /setdefaultfontpath exit | psh
if ( ${fonts_for} == 2 ) then
xset fp+ $font_dir
endif
xset fp rehash
endif
if (`xlsfonts | grep 'fixed-screen' | wc -l` == "0") then
echo "Problem installing Rational Access fonts, installation not completed."
else
echo "Rational Access fonts has been installed successfully"
endif