« Auto-éditer un wikilivre/Annexer (Version internationalisée)/install annex.sh » : différence entre les versions
Contenu supprimé Contenu ajouté
Mise à jour et correction de codes |
Mise à jour des codes |
||
Ligne 7 :
#P Creation date : 2020/06/10 by GC
#P Modification date : 2020/06/12 by GC
#P Modification date : 2021/
#P Last test date : 2021/04/
#P This program
#P
Ligne 16 :
#O Version
VERSION=
if [ "$1" = "--v" ]; then echo "Version of install_annex.sh
#O If the first parameter '$1' is empty or '?' print syntax.
Ligne 23 :
if [ -z $1 ];
then
echo "Syntax ~/Tmp/install_annex.sh [ --v | ? | Add_appendix | Annexer | /usr/local ]"; exit 0
fi
Ligne 61 :
fi
if test -d $
then echo " is ok.";
else echo " is not present, create it"; mkdir $
fi
#T Breakpoint exit 0
Ligne 72 :
echo -n "The current directory to create $Workdir sub directories = "; pwd
mkdir -p datas resources resources/{lang,lang/po,lang/man,man,man/de,man/en,man/fr}
mkdir -p bin lib lib/src sbin share src man man/{man1,fr,fr/man1,fr.UTF8,fr.UTF8/man1,es,es/man1}
echo "
▲ cd $Workdir/share
mkdir -p doc icons mime locale locale/{en,fr,es,fr/LC_MESSAGES,es/LC_MESSAGES}
#T Breakpoint exit 0
#O If findbook.sh, ecfpb.sh, ecfpc.sh, exist in the lib/src directory, build the annex.lib file
if test -e $Workdir/lib/src/findbook.sh && test -e $Workdir/lib/src/ecfpb.sh && test -e $Wordir/lib/src/ecfpc;
then▼
cat $Workdir/lib/src/findbook.sh | grep -v "#O\|#P\|#T" > $Workdir/lib/annex.lib
cat $Workdir/lib/src/ecfpb.sh | grep -v "#O\|#P\|#T" >> $Workdir/lib/annex.lib
cat $Workdir/lib/src/ecfpc.sh | grep -v "#O\|#P\|#T" >> $Workdir/lib/annex.lib
▲ fi
#O Cd home directory and print the current directory.
cd ~▼
#O If the file annex.sh exist in the
if [ -r $Installdir/src/annex.sh ];
then
Ligne 96 ⟶ 103 :
fi
▲#O List the Workdir/src directory and recreate the tmp/shell_files.prj
▲ cd ~; rm -r ./tmp
mkdir ./tmp
Srcdir=$
ls $Srcdir/*.sh > ./tmp/shell_files.prj
#T Breakpoint exit 0
Ligne 124 ⟶ 116 :
echo $line | awk -F "/" '{print $NF}' > tmpfile.txt
read file < tmpfile.txt
#T echo " file = "$file▼
▲echo " file = "$file
mkdir $Testdir/$file
cp $Srcdir/$file $Testdir/$file/$file; chmod 755 $Testdir/$file/$file
done < ./tmp/shell_files.prj
▲ if [ ! test -a /usr/local/lib/annex.lib ] || [ ! test -a $Workdir/lib/annex.lib ];
▲ then
▲ else echo; echo "Lib directory not found"
#O Clean tmpfile
rm tmpfile.txt
#rm
#O Create .pot files to translate messages.
Ligne 171 ⟶ 136 :
echo "-----"
echo "Tasks to be accomplished :"
echo "Integrate functions in the librairie $Installdir/lib/annex.lib"
echo "Copy include functions in $Installdir/lib and include files in $Installdir/bin"
echo "
echo "See also users_install_annex.sh, best command for user"
#O End 'install_annex.sh'
|