Fonction Scilab
eng - fr


generate_mod_num_web - add short decription here

Librairie

Séquence d'appel

generate_mod_num_web(path)

Paramètres

Description

Add here a paragraph of the function description. Other paragraph can be added

Add here a paragraph of the function description

Exemple

Add here scilab instructions and comments

Contenu du fichier


//generate_mod_num_web
//Fonction qui crée le répertoire
//du sîte web dans de la boîte à outils
//Entrée : path : chemin cible du sîte html

function generate_mod_num_web(path)

   //Test la présence de l'arborescence
   //du répertoire MODNUM+'/../mod_num_web'
   if fileinfo(path)==[] then
      printf('Create '+path+' ...');
      unix_g(mkdir_cmd+path);
      printf(" Done\n");
   end
   if fileinfo(path+'/src')==[] then
      printf('Create '+path+'/src'+' ...');
      unix_g(mkdir_cmd+path+'/src');
      printf(" Done\n");
   end
   if fileinfo(path+'/src/win')==[] then
      printf('Create '+path+'/src/win'+' ...');
      unix_g(mkdir_cmd+path+'/src/win');
      printf(" Done\n");
   end
   if fileinfo(path+'/src/linux')==[] then
      printf('Create '+path+'/src/linux'+' ...');
      unix_g(mkdir_cmd+path+'/src/linux');
      printf(" Done\n");
   end
   if fileinfo(path+'/bin')==[] then
      printf('Create '+path+'/bin'+' ...');
      unix_g(mkdir_cmd+path+'/bin');
      printf("Done\n");
   end
   if fileinfo(path+'/bin/win')==[] then
      printf('Create '+path+'/bin/win'+' ...');
      unix_g(mkdir_cmd+path+'/bin/win');
      printf(" Done\n");
   end
   if fileinfo(path+'/bin/linux')==[] then
      printf('Create '+path+'/bin/linux'+' ...');
      unix_g(mkdir_cmd+path+'/bin/linux');
      printf(" Done\n");
   end
   if fileinfo(path+'/web')==[] then
      printf('Create '+path+'/web'+' ...');
      unix_g(mkdir_cmd+path+'/web');
      printf(" Done\n");
   end
   if fileinfo(path+'/web/eng')==[] then
      printf('Create '+path+'/web/eng'+' ...');
      unix_g(mkdir_cmd+path+'/web/eng');
      printf(" Done\n");
   end
   if fileinfo(path+'/web/fr')==[] then
      printf('Create '+path+'/web/fr'+' ...');
      unix_g(mkdir_cmd+path+'/web/fr');
      printf(" Done\n");
   end
   if fileinfo(path+'/man')==[] then
      printf('Create '+path+'/man'+' ...');
      unix_g(mkdir_cmd+path+'/man');
      printf(" Done\n");
   end
   if fileinfo(path+'/man/htm')==[] then
      printf('Create '+path+'/man/htm'+' ...');
      unix_g(mkdir_cmd+path+'/man/htm');
      printf(" Done\n");
   end
   if fileinfo(path+'/man/htm/eng')==[] then
      printf('Create '+path+'/man/htm/eng'+' ...');
      unix_g(mkdir_cmd+path+'/man/htm/eng');
      printf(" Done\n");
   end
   if fileinfo(path+'/man/htm/fr')==[] then
      printf('Create '+path+'/man/htm/fr'+' ...');
      unix_g(mkdir_cmd+path+'/man/htm/fr');
      printf(" Done\n");
   end
   if fileinfo(path+'/man/pdf')==[] then
      printf('Create '+path+'/man/pdf'+' ...');
      unix_g(mkdir_cmd+path+'/man/pdf');
      printf(" Done\n");
   end
   if fileinfo(path+'/man/pdf/eng')==[] then
      printf('Create '+path+'/man/pdf/eng'+' ...');
      unix_g(mkdir_cmd+path+'/man/pdf/eng');
      printf(" Done\n");
   end
   if fileinfo(path+'/man/pdf/fr')==[] then
      printf('Create '+path+'/man/pdf/fr'+' ...');
      unix_g(mkdir_cmd+path+'/man/pdf/fr');
      printf(" Done\n");
   end

   //Test la présence des fichiers web
   //Version anglaise
   if fileinfo(web_path+'/eng')<>[] then
      printf('Copy '+web_path+'eng in '+path+'/web/eng'+' ...');
      unix_g(cp_cmd+web_path+'eng/*.* '+path+'/web/eng');
      printf(" Done\n");
   end
   //Version française
   if fileinfo(web_path+'/fr')<>[] then
      printf('Copy '+web_path+'fr in '+path+'/web/fr'+' ...');
      unix_g(cp_cmd+web_path+'fr/*.* '+path+'/web/fr');
      printf(" Done\n");
   end

   //Test la présence des fichiers readme
   //Version anglaise
   if fileinfo(MODNUM+'/README_EN')<>[] then
      printf('Copy '+MODNUM+'/README_EN in '+path+' ...');
      unix_g(cp_cmd+MODNUM+'/README_EN '+path);
      printf(" Done\n");
   end
   //Version française
   if fileinfo(MODNUM+'/README_FR')<>[] then
      printf('Copy '+MODNUM+'/README_FR in '+path+' ...');
      unix_g(cp_cmd+MODNUM+'/README_FR '+path);
      printf(" Done\n");
   end

   //Test la présence des fichiers man/htm
   //Version anglaise
   if fileinfo(html_path+'/eng')<>[] then
      printf('Copy '+html_path+'eng in '+path+'/man/htm/eng'+' ...');
      unix_g(cp_cmd+html_path+'eng/*.* '+path+'/man/htm/eng/');
      printf(" Done\n");
   end
   //Version française
   if fileinfo(html_path+'/fr')<>[] then
      printf('Copy '+html_path+'fr in '+path+'/man/htm/fr'+' ...');
      unix_g(cp_cmd+html_path+'fr/*.* '+path+'/man/htm/fr');
      printf(" Done\n");
   end

   //Test la présence des fichiers man/pdf
   //Version anglaise
   if fileinfo(pdf_path+'eng')<>[] then
      printf('Copy '+pdf_path+'eng in '+path+'/man/pdf/eng'+' ...');
      unix_g(cp_cmd+pdf_path+'eng/*.* '+path+'/man/pdf/eng');
      printf(" Done\n");
   end
   //Version française
   if fileinfo(pdf_path+'fr')<>[] then
      printf('Copy '+pdf_path+'fr in '+path+'/man/pdf/fr'+' ...');
      unix_g(cp_cmd+pdf_path+'fr/*.* '+path+'/man/pdf/fr');
      printf(" Done\n");
   end

endfunction 

Fonction(s) utilisée(s)

Add here the used function name and references

Auteurs

enter here the author name Add here the author references