cm-super Type1 fonts [TYPE1][PDFTEX][EC]
As you may know, cm-super fonts are GNU GPL type1 fonts (PFB files), what covers
all european computer modern (Meta)fonts (EC/TC ECC and LH fonts). These files
let pdftex produce good-lloking pdf files using only type1 fonts instead of
rasters, used when lack of type1 font description.
The actual package release is 0.3.2 (November 29, 2001) from Vladimir Volovich
(CTAN: fonts/ps-type1/cm-super/) and provides clear and easy to use installation
instructions.
Alas, thes fonts are not (or i did not found them) provided currently in the
Woody distribution, although they could come along with bluesky's fonts.
I then send a bugreport (Bug#133649: ITP: cm-super -- cm-super is a collection
of Type1 fonts.) to the debian bug tracking system, and was then contacted by
Josselin Mouette (josselin.mouette@ens-lyon.org) who told me he always tried to
build a packages to support cm-super fonts in debian.
But this is made impossible because of Debian packaging policy and the status of
the updmap script that is a config file. This file should be altered at cm-super
installation, this operation is not allowed.
It was then needed to review this script :
I rewrote a suitable updmap script, which effect is the same : it updates the
same files ps2pk.map psfonts.map pdftex.map by cat'ing a list of map file in
each one.
The new spot is that this list is not anymore hardwired in the script, instead
variables that holds a list of map is said to be an atlas (a map collection !)
and represented by a folder in which map files are copied. This structure is
hidden, and modifications are allowed with command-line options, it is
illustrated with exemples :
In these exemples, we suppose that all map files to work on are in the same
folder than the updmap scipt (this situation is today's situation, isn't it ?).
In the original updmap file we have the lines:
> extra_modules="
> txr.map
>
> "
The map txr.map is registered (or with current termnology, noted --- sorry my
english is very poor !) in the extra_modules atlas. The atlas is a directory
called extra_modules, child of a directory currently called updmap-shelf (atlas
areleaved on a bookshelf !), in the same folder than updmap, this folder
contains file txr.map.
Building these relationships with command line interface (cline for short) is
doing with :
./updmap --atlas-add=extra_modules # Creating the atlas
./updmap --atlas=extra_modules --check-in=txr.map # Registering the map in
The switch --atlas=extra_modules is said to set the target atlas to
extra_modules for the --check-in operation.
We can then read the lines:
> common_modules="
> antp.map antt.map charter.map context.map lucidabr.map marvosym.map
> mathpi.map mathpple-ext.map mt-plus.map mt-yy.map omega.map qpl.map
> qtm.map utopia.map xypic.map pazo.map cmcyr.map
>
> $extra_modules
> "
This is remplaced with an atlas called common_modules containing the files
antp.map antt.map charter.map context.map lucidabr.map marvosym.map mathpi.map
mathpple-ext.map mt-plus.map mt-yy.map omega.map qpl.map qtm.map utopia.map
xypic.map pazo.map cmcyr.map and the $extra_modules is replaced by a symlink
extra_modules -> ../extra_modules.
Theses relationships can be set up by
./updmap --atlas-add=common_modules
for k in antp.map antt.map charter.map context.map lucidabr.map marvosym.map
mathpi.map mathpple-ext.map mt-plus.map mt-yy.map omega.map qpl.map
qtm.map utopia.map xypic.map pazo.map cmcyr.map
do
./updmap --atlas=common_modules --check-in=$k
done
./updmap --atlas=common_modules --atlas-link=extra_modules
----------------------------------
I provide also a script updmap-init who set up consistent structures according
with the _default_ updamp script from the distribution, but it could read this
old updmap file and set up structures according with it.
The script is not really ready for going into distribution, if tou want it,
since i am very new to packaging (i build some home-cooked packages, especially
for documentations), and i set default comportements in my script that may not
be very suitable with autmatic installation/desinstallation : thus if the script
is interesting you (i did not contact upstream authors since i think the new
script is interesting only for debian ciommunity, but upstream authors could
also be interested in).
Please tell me about yopur interest about this new updmap script, you may read
the ./updmap --help text i wrote about (and find it not really clearwater-like
understandable !). The beginning of the file is verbose functionnality i wrote
for bash, with some doc in it, i use to say something like "source bash-verbose"
in scripts, but i here incliuded yhis kind of library in the file for
convenience.
regards,
Michaël Grünewald
#! /bin/bash
#
# SUPPORT POUR LA COMPATIBILITE AVEC L'ANCIENNE METHODE
#
# copyright (c) 2002 Michaël Grünewald <michael-grunewald@wanadoo.fr>
#
# This will be GPL blah blah
#
# bash-verbose
#
# Declare: VERBOSITY VERBOSE_LAST_BIT
# Declare: verbose_newtype verbose_mask verbose
#
VERBOSITY=0 # positive integer, as mask attribute
VERBOSE_LAST_BIT=1
declare VERBOSE_NAME
#
#
function verbose_newtype # nommasque label
# enregistre un nouveau type de bavardage
# nommasque est l'identifiant d'une variable (pour la créer)
# label est une chaîne
#
# nommasque devient l'identifiant de ce type de bavardage
{
export $1=$VERBOSE_LAST_BIT
VERBOSE_LAST_BIT=$((2 * $VERBOSE_LAST_BIT))
VERBOSE_NAME[${!1}]=$2
}
function verbose_mask # nommasque_list
# sélectionne les bavardages intéressants, d'après une liste
# d'identifiants de type de bavardage
{
local k
local m=0
for k in "$@"
do
m=$((m|${!k}))
done
VERBOSITY=$m
}
function verbose # nommasque adire
# raconte ce qu'il a adire si nommasque est l'indentifaint d'un type de
# bavardage sélectionné (la sélection se fait avec la fonction verbose_mask)
#
{
local k
if ((${!1} & $VERBOSITY))
then
echo -n "${VERBOSE_NAME[${!1}]}: " 1>&2
for ((k=2;k<=$#;k++))
do
echo -n "${!k}" 1>&2
done
echo "" 1>&2
fi
}
# EXEMPLE
#
# verbose_newtype Mvar "Variable trace"
# verbose_newtype Mexec "Execution"
# verbose_newtype Mpath "Path modification"
# verbose_newtype Mnothing "Nothing at all"
# echo Masques: $Mvar $Mexec $Mpath $Mnothing
# verbose_mask Mvar Mexec Mpath Mnothing
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# verbose_mask Mnothing
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# verbose_mask Mexec Mpath
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# verbose_mask
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# verbose_mask Mvar Mexec Mnothing
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# Produit la sortie suivante :
#
# Masques: 1 2 4 8
# Verbosity set to 15
# Variable trace: setting peer to peer
# Execution: processing list of directories
# Path modification: path is modified to /usr/local
# Nothing at all: rien à voir
# Verbosity set to 8
# Nothing at all: rien à voir
# Verbosity set to 6
# Execution: processing list of directories
# Path modification: path is modified to /usr/local
# Verbosity set to 0
# Verbosity set to 11
# Variable trace: setting peer to peer
# Execution: processing list of directories
# Nothing at all: rien à voir
#
###########################################################################
# Set up the standard Laserwriter fonts:
# urw-kb: these are included in teTeX's texmf tree
# urw-urw: these are included in ghostscript 4.0 and later. Adjust the
# search paths for type1 and afm files in texmf.cnf if you set
# this
# adobe-kb: use this if you have the original Adobe fonts. Install the
# type1 and afm files with Berry names.
###########################################################################
lw35=urw-kb # URW fonts (download type1 files using Berry names)
# lw35=urw-urw # URW fonts (download type1 files using URW names)
# lw35=adobe-kb # Adobe fonts (download type1 files using Berry names)
SHELF="extra_modules common_modules mf_modules lw35_modules
ps2pk_modules pdftex_modules"
CARTES_extra_modules="txr.map"
CARTES_common_modules="antp.map antt.map charter.map context.map lucidabr.map\
marvosym.map mathpi.map mathpple-ext.map mt-plus.map mt-yy.map omega.map\
qpl.map qtm.map utopia.map xypic.map pazo.map cmcyr.map"
CARTES_mf_modules="bsr.map bsr-interpolated.map cs.map hoekwater.map pl.map"
CARTES_lw35_modules="*-adobe-bi.map"
CARTES_ps2pk_modules="*-$lw35.map"
CARTES_pdftex_modules="*ar-ext-$lw35.map *ar-std-adobe-bi.map\
*lw35extra-$lw35.map mtsupp-ext-$lw35.map mtsupp-std-adobe-bi.map"
LIENS_common_modules="extra_modules"
LIENS_lw35_modules="common_modules"
###########################################################################
# Set to true to use postscript type1 versions for fonts with existing
# metafont versions.
###########################################################################
type1_default=false
# type1_default=true
###########################################################################
# Add CM + AMS fonst if configured:
###########################################################################
if test "x$type1_default" = xtrue; then
LIENS_lw35_modules="$LIENS_lw35_modules mf_modules"
fi
#
LIENS_ps2pk_modules="common_modules mf_modules"
LIENS_pdftex_modules="mf_modules common_modules"
#
#
#
#
function create_carte # carte
{
local carte="$1"
echo "Eg ar $carte" > "$carte"
}
#
#
# Build it
#
verbose_newtype Atlas "Atlas"
verbose_newtype Lien "Lien"
verbose_newtype Carte "Carte"
verbose_mask Atlas #Lien Carte
verbose Atlas "la liste des atlas est $SHELF"
for atlas in $SHELF
do
verbose Atlas "création de $atlas"
./updmap --atlas-add="$atlas"
CARTES_ATLAS=CARTES_$atlas
verbose Atlas "$atlas contient les cartes ${!CARTES_ATLAS}"
for carte in ${!CARTES_ATLAS}
do
#create_carte $carte
./updmap --atlas="$atlas" --check-in="$carte"
done
LIENS_ATLAS=LIENS_$atlas
verbose Atlas "$atlas contient les liens ${!LIENS_ATLAS}"
for lien in ${!LIENS_ATLAS}
do
./updmap --atlas="$atlas" --atlas-link="$lien"
done
done
#! /bin/sh
#
# copyright (c) 2002 Michaël Grünewald <michael-grunewald@wanadoo.fr>
#
# This will be GPL blah blah
#
# REMPLACEMENT DU SCRIPT updmap de teTeX-base
#
# objet: * génération des fichiers psfonts.map ps2pk.map pdftex.map
# * interface vers le mécanisme de cette génération autorisant les
# paquets du système Debian à inscrire leurs propres cartes
#
# bash-verbose
#
# Declare: VERBOSITY VERBOSE_LAST_BIT
# Declare: verbose_newtype verbose_mask verbose
#
VERBOSITY=0 # positive integer, as mask attribute
VERBOSE_LAST_BIT=1
declare VERBOSE_NAME
#
#
function verbose_newtype # nommasque label
# enregistre un nouveau type de bavardage
# nommasque est l'identifiant d'une variable (pour la créer)
# label est une chaîne
#
# nommasque devient l'identifiant de ce type de bavardage
{
export $1=$VERBOSE_LAST_BIT
VERBOSE_LAST_BIT=$((2 * $VERBOSE_LAST_BIT))
VERBOSE_NAME[${!1}]=$2
}
function verbose_mask # nommasque_list
# sélectionne les bavardages intéressants, d'après une liste
# d'identifiants de type de bavardage
{
local k
local m=0
for k in "$@"
do
m=$((m|${!k}))
done
VERBOSITY=$m
}
function verbose # nommasque adire
# raconte ce qu'il a adire si nommasque est l'indentifaint d'un type de
# bavardage sélectionné (la sélection se fait avec la fonction verbose_mask)
#
{
local k
if ((${!1} & $VERBOSITY))
then
echo -n "${VERBOSE_NAME[${!1}]}: " 1>&2
for ((k=2;k<=$#;k++))
do
echo -n "${!k}" 1>&2
done
echo "" 1>&2
fi
}
# EXEMPLE
#
# verbose_newtype Mvar "Variable trace"
# verbose_newtype Mexec "Execution"
# verbose_newtype Mpath "Path modification"
# verbose_newtype Mnothing "Nothing at all"
# echo Masques: $Mvar $Mexec $Mpath $Mnothing
# verbose_mask Mvar Mexec Mpath Mnothing
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# verbose_mask Mnothing
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# verbose_mask Mexec Mpath
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# verbose_mask
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# verbose_mask Mvar Mexec Mnothing
# echo Verbosity set to $VERBOSITY
# verbose Mvar "setting peer to peer"
# verbose Mexec "processing list of directories"
# verbose Mpath "path is modified to /usr/local"
# verbose Mnothing "rien à voir"
# echo ""
# Produit la sortie suivante :
#
# Masques: 1 2 4 8
# Verbosity set to 15
# Variable trace: setting peer to peer
# Execution: processing list of directories
# Path modification: path is modified to /usr/local
# Nothing at all: rien à voir
# Verbosity set to 8
# Nothing at all: rien à voir
# Verbosity set to 6
# Execution: processing list of directories
# Path modification: path is modified to /usr/local
# Verbosity set to 0
# Verbosity set to 11
# Variable trace: setting peer to peer
# Execution: processing list of directories
# Nothing at all: rien à voir
#
# On veut traiter deux types d'éléments : les cartes (fichiers .map) et les
# atlas(<configuration item>) qui sont des collections de cartes.
#
# Par exemple, dans le' fichier originale, on trouve :
# extra_modules="
# txr.map
# "
# Ici extra_modules est un atlas et txt.map est une carte de
# cet atlas.
#
# updmap range les atlas dans une étagère. Sur cette étagère on peut
# ajouter des atlas, et dans les atlas des cartes.
#
progname="${0##*/}"
shelf="./updmap-shelf"
cryptehantee="./updmap-crypte"
atlas="extra_modules"
out="/dev/null"
#
# task=generation|help|add|rem|cin|cout|link|unlink
#
task=generation
#
# kill=zombie|slay
# summon=born|reborn
#
# SUPPORT POUR LA GESTION DES CARTES
#
#Lorsqu'on supprime une carte ou un atlas, la valeur de kill détermine
#l'action a appliquer. Si la valeur est slay, les gens concernés
#disparaissent, sinon la valeur est zombie est les gens sont déplacvés
#vers la crypte et attendent une seconde chance avec le comportement
#reborn.
#
# Lorsqu'on ajoute un atlas ou une carte, la valeur de summon détermine
#si il faut aller chercher les gens dans la crypte en priorité (reborn)
#ou dans le monde réel (born).
#
# Ceci permet de «désactiver» certaines cartes, sans pour autant devoir
#en faire une sauvegarde à la main. Attention toutefois, le résultat
#d'un opération zombie est un déterminée si la crypte contient déjà un
#zombie du même nom (i.e. pour l'instant ce script ne fait aucune
#garantie sur ce qui se passe quand on fait cela).
#
kill=zombie
summon=born
verbose_newtype Mcline "Ligne de commande"
verbose_newtype Mop "Opération"
verbose_newtype Mliste "Liste de concaténation"
verbose_newtype Warn "Warning"
verbose_newtype Mex "Explanation"
verbose_newtype Mfollow "Follow"
function croak
# roumègue les arguments sur stderr puis termine(-1)
{
echo "$@" 1>&2
exit -1
}
function help_him
{
local proghead=$(echo -e "${progname} ")
local normhead=" "
cat - <<EOF
${normhead}Purposes:
${normhead}* maintains map files ps2pk.map psfonts.map pdftex.map
${normhead} (see file generation further)
${normhead}* provides command line interface to manage other map files
${normhead} involved in the above mentioned map files.
${normhead}Utilisation:
${normhead} $progname |--generation|--grand-oeuvre
${normhead} $progname --check-[in|out]=<carte> [<options>]
${normhead} $progname --atlas-[link|unlink]=<atlas> [<options>]
${normhead} $progname --atlas-[add|rem]=<atlas> [<options>]
${normhead} $progname --help|-h|-?|?
${normhead}Options:
${normhead} --atlas=<name> changes target atlas (default is atlas extra_modules)
${normhead} --kill=slay|zombie|exorcise changes effect of check-out and
${normhead} atlas-rem operations (see file management further)
${normhead} --summon=born|reborn changes effect of check-in and
${normhead} atlas-add operations (see file management further)
${normhead}Opertations:
${normhead} --generation or --grand-oeuvre:
${normhead} will generate the files files ps2pk.map psfonts.map
${normhead} pdftex.map as described in the the file generation section
${normhead} --check-in:
${normhead} will note <carte> in target atlas
${normhead} --check-out;
${normhead} will clear <carte> from target atlas.
${normhead} a cleared map is not noted anymore
${normhead} --atlas-link will note each carte from noted atlas <atlas>
${normhead} in the target atlas theses maps are called link-noted
${normhead} maps.
${normhead} link-noted maps can not be handled individuously
${normhead} link-noted maps can not be cleared by --check-out
${normhead} operation
${normhead} --atlas-unlink:
${normhead} will clear all link-noted maps that were noted by a
${normhead} --atlas-link operation
${normhead} --atlas-add:
${normhead} will note a new atlas <atlas>
${normhead} --atlas-rem
${normhead} will clear an atlas <atlas>
${normhead} a cleared atlas is not noted anymore
${normhead}File generation:
${normhead}For each from the three generated files, there is a dedicated
${normhead}atlas. Each file is generated by the concatenation (and a
${normhead}few post porcessing, but this is concatenation) of all the
${normhead}noted maps in their dedicated atlas. Thes dedicated atlases
${normhead}are llisted below.
${normhead} ps2pk_modules is dedicated to ps2pk.map
${normhead} lw35_modules is dedicated to psfonts.map
${normhead} pdftex_modules is dedicated to pdftex.map
${normhead}File management:
${normhead}It is a mess to have to backup files by hand. To avoid such
${normhead}impertinent derangement and other dumb file operations, there
${normhead}is file management facilities on tthe command line options.
${normhead}If you want to temporarly disable registration for an atlas
${normhead}you can use --atlas-rem operation it. It is not thrown into
${normhead}the /dev/null blackhole, but is turned into a zombie. This is
${normhead}the default comportement. You can turn it on explicitly with
${normhead}--kill=zombie option.
${normhead}If you want to definitively get rid of maps or atlas that are
${normhead}currently noted somwhere, you can use --kill=slay option on
${normhead}clearing operations.
${normhead}If you want to get rid of a zombie you can use the
${normhead}--kill=exorcise option on your clearing operations.
${normhead}The noting operations are looking for map files in the
${normhead}current directory, and creating atlas from nothing. This is
${normhead}the default comportment, you can turn it on explicitly with
${normhead}the --summon=born option on your noting operations.
${normhead}You may wish to reenable an atlas or a map tou turned into a
${normhead}zombie. You can do it by setting the --summon=reborn option
${normhead}on your noting operations.
${normhead}Be aware that this is not possible to have two entities with
${normhead}the same name existingas noted entity and as zobmie. If you
${normhead}try to go in this configuration, $progname will croak and
${normhead}advise you to consult an exorcist. If you override this by
${normhead}hand (underlying structures are not hard to understand) you
${normhead}may have some problems (nothing really bad) later since some
${normhead}parts of the script assume that you are not in this
${normhead}configuration.
(c)2002 Michaël Grünewald
this is GPL blah blah
EOF
}
function atlas_unlink
{
local link="$1"
local atlas="$2"
verbose Mop "unlinking $link from atlas $atlas"
verbose Mex "the $link map colelction will not be visible from "
verbose Mex "atlas $atlas anymore."
if(! unlink "$shelf/$atlas/$link" &> $out)
then croak "Unlinking atlas $link from atlas $atlas was not " \
"possible"
fi
}
function atlas_link
{
local link="$1"
local atlas="$2"
verbose Mop "linking atlas $atlas to $link"
verbose Mex "the $link map colelction will now be visible from "
verbose Mex "atlas $atlas."
if(! ln -s "../$link" "$shelf/$atlas/$link" &> $out)
then croak "Linking atlas $link into atla $atlas was not "\
"possible"
fi
}
function follow
# trouve tous les fichiers adéquats
# renvoie sur stdout la liste de tous les noms de fichiers accessibles
# en lecture dans l'arbirescence basée sur chemin (arg1).
{
local chemin="$1"
verbose Mfollow "beginning with $chemin"
for k in "$chemin/"*
do
if [ -d "$k" ]
then
verbose Mfollow "running through atlas $k"
follow "$k"
elif [ -r "$k" ]
then
verbose Mfollow "file $k is correct"
echo "$k"
fi
done
verbose Mfollow "i am done"
}
function talking_bout # my generation !
{
local cible="$1"
local source="$2"
verbose Mop "i will generate file $cible after source tree $source"
verbose Mop "building map list to fold into $cible"
local all=$(follow "$shelf/$source")
verbose Mop "building map list is done"
cat >$cible <<eof
% $cible: maintained by the script updmap in \$TEXMFMAIN/dvips/config.
% The preferred way to add things to this file is to put the extra lines
% into a separate file and add that filename to the updmap script. Then,
% run the updmap script to recreate this file.
eof
if [ -z "$all" ]
then
verbose Warn "pfiou ! map list from atlas $source is empty ! "
verbose Warn "i think something is going wrong !"
else
verbose Mop "generating $cible by folding $all"
if(! cat $all | grep -v '^%' | grep . | sort \
| uniq >> "$cible" 2>/dev/null)
then croak "Generation: failed on pushin $all in $cible"
fi
fi
}
function checkin # ajoute carte
{
local atlas="$1"
local map="$2"
verbose Mop "check $map into atlas $atlas"
case $summon in
reborn)
if (! mv "$cryptehantee/$atlas/$map" "$shelf/$atlas/$map" &>$out)
then croak "Summon: cannot resurrect $atlas/$map from "\
"$cryptehantee"
fi
;;
born)
if [ -r "$cryptehantee/$atlas/$map" ]
then croak -e "Summon: you cannot give birth to "\
"$atlas/$map\n"\
"Summon: $atlas/$map is alive yet as zombie\n"\
"Summon: please consult an excorcist\n"\
"Summon: ./ipdmap --kill=exorcise --atlas=$atlas "\
"--check-out=$map"
elif (! install -m 644 "$map" "$shelf/$atlas" &>$out)
then croak "Summon: cannot put $map in $shelf/$atlas"
fi
;;
esac
}
function checkout # supprime carte
{
local atlas="$1"
local map="$2"
verbose Mop "check $map out of atlas $atlas"
case $kill in
zombie)
if (! mv "$shelf/$atlas/$map" "$cryptehantee/$atlas/")
then croak "Kill: cannot turn $atlas/$map into a zombie"
fi
;;
slay)
if(! rm "$shelf/$atlas/$map")
then croak "Kill: cannot slay $atlas/$map"
fi
;;
exorcise)
if(! rm "$cryptehantee/$atlas/$map")
then croak "Kill: cannot get rid of zombie $atlas/$map"
fi
;;
esac
}
function addatlas # ajouter un atlas sur l'étagère
{
local atlas="$1"
verbose Mop "a new region was found, a new atlas is needed $atlas"
case $summon in
reborn)
if (! mv "$cryptehantee/$atlas" "$shelf" &>$out)
then croak "Atlas: cannot ressurrect $atlas from the crypt"
fi
;;
born)
if [ -d "$cryptehantee/$atlas" ]
then croak -e "Summon: you cannot give birth to "\
"atlas $atlas\n"\
"Summon: $atlas is alive yet as zombie\n"\
"Summon: please consult an excorcist\n"\
"Summon: ./ipdmap --kill=exorcise "\
"--atlas-rem=$atlas"
else
install --directory "$shelf/$atlas"
fi
;;
esac
}
function rematlas # remove atlas
{
local atlas="$1"
verbose Mop "atlas $atlas is no more interesting"
case $kill in
slay)
if (! rm -Rf "$shelf/$atlas" &>$out)
then croak "Atlas: cannot remove $atlas from the shelf"
fi
;;
zombie)
if (! mv "$shelf/$atlas" "$cryptehantee/$atlas" &>$out)
then croak "Atlas: cannot turn $atlas into zombie"
fi
;;
exorcise)
if (! rm -Rf "$cryptehantee/$atlas" &>$out)
then croak "Atlas: cannot get rid of atlas zombie $atlas"
fi
;;
esac
}
function process_cline
{
for k in "$@"
do
case "$k"
in
--check-in=*)
map=${k#*=}
task=cin
verbose Mcline "task is now $task, concerning map $map " \
"and atlas $atlas"
;;
--check-out=*)
map=${k#*=}
task=cout
verbose Mcline "task is now $task, concerning map $map " \
"and atlas $atlas"
;;
--atlas=*)
atlas=${k#*=}
verbose Mcline "task is now $task, concerning map $map " \
"and atlas $atlas"
;;
--atlas-add=*)
atlas=${k#*=}
task=add
verbose Mcline "task is now $task, concerning atlas $atlas"
;;
--atlas-rem=*)
atlas=${k#*=}
task=rem
verbose Mcline "task is now $task, concerning atlas $atlas"
;;
--atlas-link=*)
link=${k#*=}
task=link
verbose Mcline "task is now $task, maps from atlas $link "\
"will be appended to maps from atlas $atlas"
;;
--atlas-unlink=*)
link=${k#*=}
task=unlink
verbose Mcline "task is now $task, maps from atlas $link "\
"will not be appended to maps from atlas $atlas anymore"
;;
--generation|--grand-oeuvre)
task=generation
verbose Mcline "task is now $task"
;;
--kill=zombie|--kill=slay|--kill=exorcise)
kill=${k#*=}
verbose Mcline "kill method is now $kill"
;;
--summon=born|--summon=reborn)
summon=${k#*=}
verbose Mcline "search method is now $summon"
;;
--help|-h|-\?|\?)
task=help
;;
*)
echo "$progname option $k non reconnue."
task=help
;;
esac
done
}
function work_it_out_brother
{
case $task in
help)
help_him
;;
add)
addatlas "$atlas"
;;
rem)
rematlas "$atlas"
;;
cin)
checkin "$atlas" "$map"
;;
cout)
checkout "$atlas" "$map"
;;
link)
atlas_link "$link" "$atlas"
;;
unlink)
atlas_unlink "$link" "$atlas"
;;
generation)
talking_bout psfonts.map lw35_modules
talking_bout ps2pk.map ps2pk_modules
talking_bout pdftex.map pdftex_modules
;;
esac
}
#verbose_mask Mcline Mop Warn Mfollow
process_cline "$@"
work_it_out_brother
Reply to: