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

Un livre de Wikilivres.
Aller à la navigation Aller à la recherche

Ce script commande la mise à jour, ou l'installation, de tous les fichiers éprouvés dans le répertoire des tests de l'application 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
#. gettext.sh
#
#D Documentation of file cp_all_to_Add_appendix.bash
#D $Workdir is ~/Add_appendix or ~/Annexer
#D This script install all tested sources files in $Workdir/bin for addappendix
#D software, copy the tested addappendix sources files to $Workdir/bin and
#D create translated messages .mo files if if necessary.
#D Also install alls tested sbin sources files to $Workdir/sbin
#D
VERSION=211205
clear
if pwd | grep Add_appendix >/dev/null
then 
  Workdir=~/Add_appendix
  Srcs=~/Add_appendix/src/Add_appendix
  echo "Working directory (Workdir) = $Workdir"
  echo "Sources directory = $Srcs"  
elif pwd | grep Annexer>/dev/null
then
  Workdir=~/Annexer
  Srcs=~/Annexer/src/Annexer
  echo "Répertoire de travail (Workdir) = $Workdir"
  echo "Réperdoire des sources = $Srcs"
else 
  echo "Workdir not found, exit"; exit 1
fi
#
if test -e $Workdir/vars/installdir.var
then source $Workdir/vars/installdir.var
fi
# Forcing $Testsdir and $Libdir
Testsdir=$Workdir/tests
echo "Testsdir = $Testsdir"
Libdir=$Workdir/lib
echo "Libdir = $Libdir"
# Update lib
$Testsdir/1-annex.lib/updt-annex-lib.sh

if test -e $Libdir/annex.lib
then 
  echo "$Libdir/annex.lib is found"
  source $Libdir/annex.lib
else
  $Libdir/annex.lib
  exit -1
fi
#Test exit 0

echo "cp_all_to_Add_appendix.bash version : $VERSION"

# ******************* addappendix scripts.
# $Testsdir/00-install_annex
$Testsdir/00-install_annex/updt-install.bash
#Test exit 0

# $Testsdir/01-sbsrc
$Testsdir/01-sbsrc/updt-sbinsrcs.bash

# $Testsdir/02-manuels
$Testsdir/02-manuels/updt-manuals.bash

# $Testsdir/0-pre-annex.sh/
echo -e "\033[1;33m### Copy pre-annex.sh to src and bin directories ###\033[0m"
cp -u $Testsdir/0-pre-annex.sh/pre-annex.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/pre-annex.sh

# $Testsdir/1-annex.lib/
#echo -e "\033[1;33m### Copy libsrcs to $Libdir/src and install annex.lib ###\033[0m"
# $Testsdir/1-annex.lib/updt-annex-lib.sh # fait en tete de cette commande lignes 34-44

# $Testsdir/2-annex.sh/
echo -e "\033[1;33m### Copy annex to src and bin directories ###\033[0m"
cp -u $Testsdir/2-annex.sh/annex.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/annex.sh

# $Testsdir/3-header.inc.sh/
echo -e "\033[1;33m### Copy header.inc to src and bin directories ###\033[0m"
cp -u $Testsdir/3-header.inc.sh/header.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/header.inc.sh

# $Testsdir/4-list.sh/
echo -e "\033[1;33m### Copy list to src and bin directories ###\033[0m"
cp -u $Testsdir/4-list.sh/list.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/list.sh

# $Testsdir/5-download.sh/
echo -e "\033[1;33m### Copy download to src and bin directories ###\033[0m"
cp -u $Testsdir/5-download.sh/download.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/download.sh

# $Testsdir/6-add_sclt.sh/
# 6 add_sclt.sh
echo -e "\033[1;33m### Copy add_sclt to src and bin directories ###\033[0m"
cp -u $Testsdir/6-add_sclt.sh/add_sclt.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/add_sclt.sh

# 6 en_sclt.inc.sh
echo -e "\033[1;33m### Copy en_sclt.inc to src and bin directories ###\033[0m"
cp -u $Testsdir/6-add_sclt.sh/en_sclt.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/en_sclt.inc.sh

# 6 fr_sclt.inc.sh
echo -e "\033[1;33m### Copy fr_sclt to src and bin directories ###\033[0m"
cp -u $Testsdir/6-add_sclt.sh/fr_sclt.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/fr_sclt.inc.sh

# $Testsdir/7-scli.inc.sh/
echo -e "\033[1;33m### Copy scli.inc to src and bin directories ###\033[0m"
cp -u $Testsdir/7-scli.inc.sh/scli.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/scli.inc.sh

# $Testsdir/8-add_sclic.sh/
# 8 add_sclic.sh
echo -e "\033[1;33m### Copy add_sclic to src and bin directories ###\033[0m"
cp -u $Testsdir/8-add_sclic.sh/add_sclic.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/add_sclic.sh

# 8 en_sclic.inc
echo -e "\033[1;33m### Copy en_sclic.inc to src and bin directories ###\033[0m"
cp -u $Testsdir/8-add_sclic.sh/en_sclic.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/en_sclic.inc.sh

# 8 fr_sclic.inc
echo -e "\033[1;33m### Copy fr_sclic.inc to src and bin directories ###\033[0m"
cp -u $Testsdir/8-add_sclic.sh/fr_sclic.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/fr_sclic.inc.sh

# $Testsdir/9-add_sclipco.sh/
# 9 add_sclipco.sh
echo -e "\033[1;33m### Copy add_sclipco to src and bin directories ###\033[0m"
cp -u $Testsdir/9-add_sclipco.sh/add_sclipco.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/add_sclipco.sh

# 9 en_sclipco.inc.sh
echo -e "\033[1;33m### Copy en_sclipco.inc to src and bin directories ###\033[0m"
cp -u $Testsdir/9-add_sclipco.sh/en_sclipco.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/en_sclipco.inc.sh

# 9 fr_sclipco.inc.sh
echo -e "\033[1;33m### Copy fr_sclipco.inc to src and bin directories ###\033[0m"
cp -u $Testsdir/9-add_sclipco.sh/fr_sclipco.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/fr_sclipco.inc.sh

# $Testsdir/10-add_sclipwb.sh/
# 10 add_sclipwb.sh
echo -e "\033[1;33m### Copy add_sclipwb to src and bin directories ###\033[0m"
cp -u $Testsdir/10-add_sclipwb.sh/add_sclipwb.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/add_sclipwb.sh

# 10 en_sclipwb.inc.sh
echo -e "\033[1;33m### Copy en_sclipwb.inc to src and bin directories ###\033[0m"
cp -u  $Testsdir/10-add_sclipwb.sh/en_sclipwb.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/en_sclipwb.inc.sh

# 10 fr_sclipwb.inc.sh
echo -e "\033[1;33m### Copy fr_sclipwb.inc to src and bin directories ###\033[0m"
cp -u $Testsdir/10-add_sclipwb.sh/fr_sclipwb.inc.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/fr_sclipwb.inc.sh

# $Testsdir/11-annexer.sh/
echo -e "\033[1;33m### Copy annexer to src and bin directories ###\033[0m"
cp -u $Testsdir/11-annexer.sh/annexer.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/annexer.sh

# Testsdir/12-addappendix.sh/
echo -e "\033[1;33m### Copy addappendix to src and bin directories ###\033[0m"
cp -u $Testsdir/12-addappendix.sh/addappendix.sh $Workdir/$Srcs/.
chmod 666 $Workdir/$Srcs/addappendix.sh

# Update bin directory
cd $Workdir
sbin/compil2bin $Srcs bin >/dev/null

# End for cp_all_to_Add_appendix.bash