Auto-éditer un wikilivre/Annexer (Version internationalisée)/man
Update user manuals
modifier- This file is in .../test/02-manuel/.
- This directory is used for testing and update the manuals in the same directory
- Ce fichier est dans le répertoire 02-manuel des tests d'épreuve les scripts *.1
- Ce répertoire est utilisé pour mettre les manuels à jour dans ce même répertoire.
- Update_manuals.bash copy all testeds manuals to working-dir/share/man and eventually to /usr/share/man
- It is the same for the contents of the sbin directory which contains the aliases htmlman textman and userman
- Update_manuals.bash copie les manuels éprouvés dans le répertoire de travail share/man de l'application et, le cas échéant, si le répertoire d'installation est /usr/local, dans le répertoire du système /usr/share/man
- Il en est de même pour le contenu du répertoire sbin qui contient les alias htmlman textman et userman
#!/bin/bash
#H File : updt-manuals.bash
#D Copy all testeds manuals in working/man directory and eventually to /usr/local/man
#D if Installdir is /urs/local
VERSION=211126
#O Include install variables
pwd > pwd.txt
if cat pwd.txt | grep ~/Annexer
then Workdir=~/Annexer
elif cat pwd.txt | grep ~/Add_appendix
then Workdir=~/Add_appendix
else echo "Working directory not found"
exit -1
fi
rm pwd.txt
#O Download global variables
source $Workdir/vars/installdir.var
if test -z $$Mandir
then Mandir=$Installdir/man
fi
if test -z $Sbindir
then Sbindir=$Installdir/sbin
fi
#O Copy all tested manuals files in this man directory
cd $Workdir/tests/02-manuels
if test -L $Workdir/man
then
mkdir -p $Workdir/man/{man1,de/man1,en/man1,es/man1,fr/man1}
# manuals
cp -uR man1/*.gz $Workdir/man/man1/.
cp -uR de/man1/*.gz $Workdir/man/de/man1/.
cp -uR en/man1/*.gz $Workdir/man/en/man1/.
cp -uR es/man1/*.gz $Workdir/man/es/man1/.
cp -uR fr/man1/*.gz $Workdir/man/fr/man1/.
cp -uR fr.UTF-8/man1/*.gz $Workdir/man/fr/man1/.
# manuals html
cp -uR man1/*.html $Workdir/man/man1/.
cp -uR en/man1/*.html $Workdir/man/en/man1/.
cp -uR fr.UTF-8/man1/*.html $Workdir/man/fr/man1/.
# manuals text
cp -uR man1/*.txt $Workdir/man/man1/.
cp -uR en/man1/*.txt $Workdir/man/en/man1/.
cp -uR fr.UTF-8/man1/*.txt $Workdir/man/fr/man1/.
# recursive doc html and txt
cp -uR de/man1/* $Workdir/mam/de/man1/.
cp -uR fr/man1/* $Workdir/man/fr/man1/.
else
echo "$Workdir/man not found"
exit -1
fi
#O Copy utility files
cp -u docu2html.sh $Workdir/sbin/docu2html
cp -u aliases-html-txt/htmlman.sh $Workdir/sbin/htmlman
cp -u aliases-html-txt/textman.sh $Workdir/sbin/textman
cp -u aliases-html-txt/userman.sh $Workdir/sbin/userman
cp -u updt-manuals.bash $Workdir/sbin/updt-manuals
#O IF Installdir is /usr/local copy all man files and sbin files to /usr/local
if [ "$Installdir" = "/usr/local" ]
then
sudo cp -uR $Workdir/man/* $Mandir/.
sudo cp -uR $Workdir/sbin $Sbindir/.
fi
exit 0
#O End of file updt-manuals.bash
Update sytem manuals
modifier#!/bin/make
# file:man.mak for packaging ubuntu addappendix or annexer
# addappendix-O~211213
# updated by french wikibooks user:Goelette_Cardabela
# To install : sudo make f- man.mak -d clean install
# To test : make -f man.mak -d clean install DESTDIR=./tests
# To examine ./tests directory type find ./tests
# Lors de l'installation les fichiers sources doivent être recopiés
# d'un autre répertoire qui peut être dans ~/Add_appendix
#
# This test makefile is in $HOME/Add_appendix/tests/PACKAGES/man
# system directories
MAN = $(DESTDIR)/usr/share/man
install:
install -d $(MAN)/de $(MAN)/en $(MAN)/es $(MAN)/fr $(MAN)/fr.UTF-8 $(MAN)/man1
# for simulation in package root directory
if [ -e $(HOME)/Annexer/share ]; then \
@echo "local Sharedir = $(HOME)/Annexer/share";\
cp -Ru $(HOME)/Annexer/share/man/* $(MAN)/.;\
elif\
[ -e $(HOME)/Add_appendix/share/mime/packages ]; then \
@echo "local Sharedir =$(HOME)/Add_appendix/share)";\
cp -Ru $(HOME)/Add_appendix/share/man/* $(MAN)/.;\
else echo "pgm directory not found."; exit 255;\
fi
@if [ -z $(DESTDIR) ]; then mandb -u; fi
clean:
Result
modifierfind ./tests
./tests ./tests/usr ./tests/usr/share ./tests/usr/share/man ./tests/usr/share/man/es ./tests/usr/share/man/es/man1 ./tests/usr/share/man/en ./tests/usr/share/man/en/man1 ./tests/usr/share/man/en/man1/annex.txt ./tests/usr/share/man/en/man1/annex.html ./tests/usr/share/man/en/man1/compil2bin.html ./tests/usr/share/man/en/man1/compil2bin.1.gz ./tests/usr/share/man/en/man1/compil2bin.txt ./tests/usr/share/man/en/man1/annex.1.gz ./tests/usr/share/man/aliases-html-txt ./tests/usr/share/man/aliases-html-txt/userman.sh ./tests/usr/share/man/aliases-html-txt/htmlman.sh ./tests/usr/share/man/aliases-html-txt/textman.sh ./tests/usr/share/man/de ./tests/usr/share/man/de/man1 ./tests/usr/share/man/fr ./tests/usr/share/man/fr/man1 ./tests/usr/share/man/fr/man1/annex.txt ./tests/usr/share/man/fr/man1/annex.html ./tests/usr/share/man/fr/man1/annexer.1.gz ./tests/usr/share/man/fr/man1/annex.1.gz ./tests/usr/share/man/fr/man1/annexer_fr.1.gz ./tests/usr/share/man/fr/man1/annexer.html ./tests/usr/share/man/fr/man1/annexer.txt ./tests/usr/share/man/man1 ./tests/usr/share/man/man1/annex.txt ./tests/usr/share/man/man1/annex.html ./tests/usr/share/man/man1/compil2bin.1.gz ./tests/usr/share/man/man1/compil2bin.txt ./tests/usr/share/man/man1/annex.1.gz ./tests/usr/share/man/fr.UTF-8 ./tests/usr/share/man/fr.UTF-8/man1 ./tests/usr/share/man/fr.UTF-8/man1/annex.txt ./tests/usr/share/man/fr.UTF-8/man1/annex.html ./tests/usr/share/man/fr.UTF-8/man1/annexer.1.gz ./tests/usr/share/man/fr.UTF-8/man1/annex.1.gz ./tests/usr/share/man/fr.UTF-8/man1/annexer.html ./tests/usr/share/man/fr.UTF-8/man1/annexer.txt ./tests/usr/share/manfr.UTF-8