Différences entre les versions de « Auto-éditer un wikilivre/Annexer (Version internationalisée)/src/pre-annex.sh »

Aller à la navigation Aller à la recherche
→‎pre-annex.sh : Mise à jour de version
(→‎pre-annex.sh : Mise àjur)
(→‎pre-annex.sh : Mise à jour de version)
 
 
VERSION=210516210520
 
#O If first parameter is "--v", print pre-annex version
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
fi
#O Create the project directory
Projectdir=$WorkdirBooksdir/$Bookname
if ! test -d "$Projectdir"; then mkdir $Projectdir; fi
#O Create the file bookname.suffix
if [ "$Inkey" = 'y' ]
then
gedit $Workdir/$Book/$Bookname/$Bookname.$Suffix&
xdg-open $1
fi
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>
 

Menu de navigation