Outils pour utilisateurs

Outils du site


scriptshell

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Dernière révision Les deux révisions suivantes
scriptshell [2018/01/06 11:47]
bvandepo
scriptshell [2018/01/06 14:20]
bvandepo
Ligne 7: Ligne 7:
  
 #check that soffice is not already run #check that soffice is not already run
-SOFFICE_RUNNING=$(ps | grep soffice)+SOFFICE_RUNNING=$(pstree ​| grep soffice)
 if [ ! -z "​$SOFFICE_RUNNING"​ ]; if [ ! -z "​$SOFFICE_RUNNING"​ ];
 then then
Ligne 30: Ligne 30:
     if [ ${OFFICE_FILE} -nt ${PDF_FILE_WITH_FOLDER} ]     if [ ${OFFICE_FILE} -nt ${PDF_FILE_WITH_FOLDER} ]
     then     then
-      ​echo "this file has changed, converting it to pdf: ${OFFICE_FILE} -> ${PDF_FILE_WITH_FOLDER}"​+       echo "this file has changed, converting it to pdf: ${OFFICE_FILE} -> ${PDF_FILE_WITH_FOLDER}"​ 
 +       rm ${PDF_FILE_WITH_FOLDER}
        #​convert each individual file to pdf        #​convert each individual file to pdf
-      soffice --convert-to pdf --outdir ${OUTPUT_DIR} ​ ${line}+       echo "​soffice --convert-to pdf --outdir ${OUTPUT_DIR} ​ ${OFFICE_FILE}"​ 
 +       soffice --convert-to pdf --outdir ${OUTPUT_DIR} ​ ${OFFICE_FILE}
     else     else
       echo "this file has not changed, keeping the previous pdf: ${OFFICE_FILE} -> ${PDF_FILE_WITH_FOLDER}"​       echo "this file has not changed, keeping the previous pdf: ${OFFICE_FILE} -> ${PDF_FILE_WITH_FOLDER}"​
scriptshell.txt · Dernière modification: 2018/01/21 23:26 par bvandepo