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

Contenu supprimé Contenu ajouté
→‎pre-annex.sh : Mise àjur
→‎pre-annex.sh : Mise à jour de version
Ligne 49 :
 
 
VERSION=210516210520
 
#O If first parameter is "--v", print pre-annex version
Ligne 65 :
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 "Workind drectorydirectory not found"; exit -1;fi
rm pwd.txt
source $Workdir/datasvars/installdir.var
if [ "$1" = "--t" ] || [ "$2" = "--t" ] ; then echo; echo "Global install variables :"; cat $Workdir/datasvars/installdir.var; fi
#T Test break exit 0
#O Find function findbook
Libdir=$Workdir/lib
Booksdir=$Workdir/books
if test -e $Libdir/annex.lib; then source $Libdir/annex.lib; elif test -e $Libdir/src/findbook.sh; \
then source $Libdir/src/findbook.sh; else echo "Function findbook not found"; exit-1; fi
Ligne 110 ⟶ 111 :
fi
#O Create the project directory
Projectdir=$WorkdirBooksdir/$Bookname
if ! test -d "$Projectdir"; then mkdir $Projectdir; fi
#O Create the file bookname.suffix
Ligne 157 ⟶ 158 :
if [ "$Inkey" = 'y' ]
then
gedit $Workdir/$Book/$Bookname/$Bookname.$Suffix&
xdg-open $1
fi
Ligne 180 ⟶ 181 :
else echo "$Htmlbook not found"
fi
Varsdir=$Workdir/vars
#O Copy the variables from the book to 'vars/$Bookname.var'
if test -n "$Site"; then echo "Site=$Site" > $Varsdir/$Bookname.var; fi
if test -n "$Bookname"; then echo "Bookname=$Bookname" >> $Varsdir/$Bookname.var; fi
if test -n "$Suffix"; then echo "Suffix=$Suffix" >> $Varsdir/$Bookname.var; fi
if test -n "$Projectdir"; then echo "Projectdir=$Projectdir" >> $Varsdir/$Bookname.var; fi
if test -n "$Bookfullurl"; then echo "Bookfullurl=$Bookfullurl" >> $Varsdir/$Bookname.var; fi
if test -n "$Compilfullurl"; then echo "Compilfullurl=$Compilfullurl" >> $Varsdir/$Bookname.var; fi
if test -n "$Htmlbook"; then echo "Htmlbook=$Htmlbook" >> $Varsdir/$Bookname.var; fi
#O End pre-annex.sh
</syntaxhighlight>