« Auto-éditer un wikilivre/Annexer (Version internationalisée)/cp-src2bin.sh » : différence entre les versions

Contenu supprimé Contenu ajouté
→‎Compil2bin.sh : Mise à jour
Mise à jour
Ligne 15 :
#H
 
VERSION=211105211106
 
pwd > pwd.txt
Ligne 254 :
 
#P End cp-src2bin
</syntaxhighlight>
 
== test_compil2bin.bash ==
* test program is in $Testdir/01-sbsrc/O11/compil2bin.sh/
* This test program also makes the manual copyable to /usr/share/man/man1/.
* syntax: sudo cp compil2bin_en.1.gz /usr/share/man/man1/compil2bin.1.gz
<syntaxhighlight lang="bash">
#!/bin/bash
#H File test_compil2bin.bash
#H
 
VERSION=211105
 
pwd > pwd.txt
read Currentdir<pwd.txt
 
cat pwd.txt | cut -d "/" -f4 > workname.txt
read Workname<workname.txt
#T echo -n "Working name directory= $Workname"
if [ $Workname = "Annexer" ] || [ $Workname = "Add_appendix" ]
then echo -n "" #T echo " is found";
else echo " Currentdir is not a working name directory"; exit -1
fi
rm workname.txt pwd.txt
 
Workdir=~/$Workname
Libdir=$Workdir/lib
source $Workdir/vars/installdir.var
Testsdir=$Workdir/tests
clear
 
if [ "$1" = "--v" ]; then echo "Version of test_compil2bin.bash $VERSION";exit 0;fi
 
echo -e "\033[1;33mcommande ./compil2bin.sh --v \033[0m"
./compil2bin.sh --v
sleep 3
echo "----"
 
echo -e "\033[1;33mcommande ./compil2bin.sh --v --t \033[0m"
./compil2bin.sh --v --t
sleep 3
echo "----"
 
echo -e "\033[1;33mcommande ./compil2bin.sh src bin --t \033[0m"
./compil2bin.sh src bin --t
sleep 3
echo "----"
 
echo -e "\033[1;33mcommande ./compil2bin.sh src bin compil2bin.sh --t; ls -1 bin after 3 sec \033[0m"
./compil2bin.sh src bin compil2bin.sh --t
sleep 3
echo -e "\033[1;33m ls -1 bin: \033[0m"; ls -1 bin
echo -e "\033[1;33m make local manual of compil2bin wtith compil2bin.sh \033[0m"
cat compil2bin.sh | grep "#M " | sed "s/#M //g" | grep -v "#P" > compil2bin_en.1
gzip compil2bin_en.1 compil2bin_en.1.gz
mv compil2bin_en.1.gz man/compil2bin_en.1.gz
man man/compil2bin_en.1.gz
sleep 3
echo "----"
 
echo -e "\033[1;33m./compil2bin.sh $Currentdir/src $Currentdir/bin \033[0m"
./compil2bin.sh $Currentdir/src $Currentdir/bin
sleep 3
ls -al bin
echo "----"
 
echo -e "\033[1;33m./compil2bin.sh $Currentdir/src $Currentdir/bin compil2bin.sh cp-src2bin.sh docu2html.sh findversions.sh install_annex.sh install_datasfiles.sh makeman_annex.sh users_install_annex.sh \033[0m"
 
./compil2bin.sh $Currentdir/src $Currentdir/bin compil2bin.sh cp-src2bin.sh docu2html.sh findversions.sh install_annex.sh install_datasfiles.sh makeman_annex.sh users_install_annex.sh
sleep 3
ls -al bin
echo "----"
 
clear
cd src;ls -m *.sh | sed "s/,//g"|tr "\n" " ">listm.txt
echo "List of files in srcdir:"; cat listm.txt; echo
cd $Currentdir
read Parameters < src/listm.txt
echo "Parameters: $Parameters"
echo -e "\033[1;33m./compil2bin.sh $Currentdir/src $Currentdir/bin $Parameters \033[0m"
./compil2bin.sh $Currentdir/src $Currentdir/bin $Parameters
ls -al bin
echo "----"
</syntaxhighlight>
{{Autocat}}