Auto-éditer un wikilivre/Annexer (Version internationalisée)/cp all to Add appendix.bash

Ce script commande la mise à jour, ou l'installation, de tous les fichiers éprovés dans le répertoire des tests de l'appli cation Add_appendix

#!/bin/bash
#H Directory : tests
#H File      : cp_all_to_Add_appendix.bash
#H Syntax    : in tests directory ./cp_all_to_Add_appendix.bash
VERSION=210616

Rootdir=~/Add_appendix
Testdir=$Rootdir/tests
Libdir=$Rootdir/lib

echo "cp_all_to_Add_appendix.bash version : $VERSION"

# 0-pre-annex.sh
File0=pre-annex
echo -e "\033[1;33m### Copy $File0 to src and bin directories ###\033[0m"
cat $Testdir/0-$File0.sh/$File0.sh > $Rootdir/src/$File0.sh
chmod 666 $Rootdir/src/$File0.sh
cat $Testdir/0-$File0.sh/$File0.sh | grep -v "#T\|#O\|#P" > $Rootdir/bin/$File0
chmod 755 $Rootdir/bin/$File0

# 1-annex.lib
#File1=annex.lib
#echo -e "\033[1;33m### Copy $File1 to lib/src and lib directories ###\033[0m"
#cat $Testdir/1-$File1.sh/$File1.sh > $Rootdir/lib/src/$File1.sh
#chmod 666 $Rootdir/Lib/src/$File1.sh
#cat $Testdir/1-$File01.sh/$File1.sh | grep -v "#T\|#O\|#P" > $Rootdir/lib/$File1
#chmod 666 $Rootdir/lib/$File1
## 1-annex.lib/11-findbook.sh
File11=findbook
echo -e "\033[1;31m### Copy $File11 to $Libdir/src directory ###\033[0m"
cat $Testdir/1-annex.lib/11-$File11.sh/$File11.sh > $Libdir/src/$File11.sh
chmod 666 $Libdir/src/$File11.sh
## 12-ecfpb.sh
## 13-ecfpc.sh
#echo -e "\033[1;33m### Make annex.lib to lib directory ###\033[0m"
#cat $Libdir/src/$File11.sh > $Libdir/src/annex.lib.sh
#cat $Libdir/src/$File12.sh >> $Libdir/src/annex.lib.sh
#cat $Libdir/src/$File13.sh >> $Libdir/src/annex.lib.sh
#cat $Libdir/src/annex.lib.sh | grep -v "#T\|#O\|#P" > $Libdir/annex.lib

# 2-annex.sh
#File2=annex
#echo -e "\033[1;33m### Copy $File2 to src and bin directories ###\033[0m"
#cat $Testdir/2-$File2.sh/$File2.sh > $Rootdir/src/$File2.sh
#chmod 666 $Rootdir/src/$File2.sh
#cat $Testdir/2-$File2.sh/$File2.sh | grep -v "#T\|#O\|#P" > $Rootdir/bin/$File2
#chmod 755 $Rootdir/bin/$File2

# 3-header.inc.sh
File3=header.inc
echo -e "\033[1;33m### Copy $File3 to src and bin directories ###\033[0m"
cat $Testdir/3-$File3.sh/$File3.sh > $Rootdir/src/$File3.sh
chmod 666 $Rootdir/src/$File3.sh
cat $Testdir/3-$File3.sh/$File3.sh | grep -v "#T\|#O\|#P" > $Rootdir/bin/$File3
chmod 755 $Rootdir/bin/$File3

# 4-list.sh
File4=list
echo -e "\033[1;33m### Copy $File4 to src and bin directories ###\033[0m"
cat $Testdir/4-$File4.sh/$File4.sh > $Rootdir/src/$File4.sh
chmod 666 $Rootdir/src/$File4.sh
cat $Testdir/4-$File4.sh/$File4.sh | grep -v "#T\|#O\|#P" > $Rootdir/bin/$File4
chmod 755 $Rootdir/bin/$File4

# 5-download.sh
File5=download
echo -e "\033[1;33m### Copy $File5 to src and bin directories ###\033[0m"
cat $Testdir/5-$File5.sh/$File5.sh > $Rootdir/src/$File5.sh
chmod 666 $Rootdir/src/$File5.sh
cat $Testdir/5-$File5.sh/$File5.sh | grep -v "#T\|#O\|#P" > $Rootdir/bin/$File5
chmod 755 $Rootdir/bin/$File5

# 6-add_sclt.sh
# 6 add_sclt
echo -e "\033[1;33m### Copy add_sclt to src and bin directories ###\033[0m"
cat $Testdir/6-add_sclt.sh/add_sclt.sh > $Rootdir/src/add_sclt.sh
chmod 666 $Rootdir/src/add_sclt.sh
cat $Testdir/6-add_sclt.sh/add_sclt.sh | grep -v "#T\|#O\|#P" > $Rootdir/bin/add_sclt
chmod 755 $Rootdir/bin/add_sclt
# 6 en_sclt
echo -e "\033[1;33m###   Copy en_sclt to src and bin directories ###\033[0m"
cat $Testdir/6-add_sclt.sh/en_sclt.inc.sh > $Rootdir/src/en_sclt.inc.sh
chmod 666 $Rootdir/src/en_sclt.inc.sh
cat $Testdir/6-add_sclt.sh/en_sclt.inc.sh | grep -v "#T\|#O\|#P" > $Rootdir/bin/en_sclt.inc
chmod 666 $Rootdir/bin/en_sclt.inc
# 6 fr_sclt
echo -e "\033[1;33m###   Copy fr_sclt to src and bin directories ###\033[0m"
cat $Testdir/6-add_sclt.sh/fr_sclt.inc.sh > $Rootdir/src/fr_sclt.inc.sh
chmod 666 $Rootdir/src/fr_sclt.inc.sh
cat $Testdir/6-add_sclt.sh/fr_sclt.inc.sh | grep -v "#T\|#O\|#P" > $Rootdir/bin/fr_sclt.inc
chmod 666 $Rootdir/bin/fr_sclt.inc

# 7-add_sclic.sh
# 8add_sclip.inc.sh
# 10-sclipwb.sh