From c273f59bd1323e9c62e5b80aa1c9f87b8e7405c4 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 13 Nov 2009 18:47:28 +0100 Subject: [PATCH] buildDocExports : fix bugs --- buildDocExports.sh | 19 +++++++++++-------- config.local/local.sh.example | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/buildDocExports.sh b/buildDocExports.sh index ca30da56..84c398bb 100755 --- a/buildDocExports.sh +++ b/buildDocExports.sh @@ -38,7 +38,7 @@ then cp -f $DOC_DIR/exports/pdf/LdapSaisie.pdf $EXPORT_DOC_DIR/LdapSaisie.pdf if [ $? -ne 0 ] then - echo Error + echo -e "\n-> Error" ERROR=1 else echo Ok @@ -97,12 +97,12 @@ then cd $DOC_DIR for i in `find -type d|grep -v 'export'` do - mkdir -p $TMP_DIR/$DOCBOOK/$i + mkdir -p $TMP_DIR/$DOCBOOK/$i done - for i in `find -type f|grep -v '(Makefile|^./export)'` + for i in `find -type f|egrep -v '(Makefile|^./export)'` do - cp $i $TMP_DIR/$DOCBOOK/$i + cp $i $TMP_DIR/$DOCBOOK/$i done echo "done. Build archive and move it later ..." @@ -114,22 +114,23 @@ for i in $ALL_IN_ONE $ONLINE $DOCBOOK do echo -e "\t$i : " echo -en "\t\t+ Archive : " - tar -cjf LdapSaisie--Doc--$i.tar.bz2 $i && mv LdapSaisie--Doc--$i.tar.bz2 $EXPORT_DOC_DIR/ + tar -cjf LdapSaisie--Doc--$i.tar.bz2 $i && mv LdapSaisie--Doc--$i.tar.bz2 $EXPORT_DOC_DIR/ if [ $? -eq 0 ] then echo Ok else - echo Erreur + echo -e "\n-> Error" ERROR=1 fi echo -en "\t\t+ Web dir : " - rm -fr $EXPORT_DOC_DIR/$i/* && cp -fr $i/* $EXPORT_DOC_DIR/$i/ && rm -fr $i + [ ! -d "$EXPORT_DOC_DIR/$i" ] && echo "you must create export $i directory manualy before run this script. (path : $EXPORT_DOC_DIR/$i)" && continue + rm -fr $EXPORT_DOC_DIR/$i/* && cp -fr $i/* $EXPORT_DOC_DIR/$i/ && rm -fr $i if [ $? -eq 0 ] then echo Ok else - echo Erreur + echo -e "\n-> Error" ERROR=1 fi done @@ -144,3 +145,5 @@ then fi rm -fr $TMP_DIR + +exit $ERROR diff --git a/config.local/local.sh.example b/config.local/local.sh.example index b6a74528..6b74f901 100644 --- a/config.local/local.sh.example +++ b/config.local/local.sh.example @@ -33,10 +33,10 @@ ONLINE=online DOCBOOK=docbook # The CSS file to use in export -CSS=$DOC_DIR/styles/LS.css +CSS=$ROOT_DIR/doc/styles/LS.css # The image doc directory -IMAGES=$DOC_DIR/images +IMAGES=$ROOT_DIR/doc/images # The name of last update file LAST_UPDATE_FILE=$EXPORT_DIR/last_update.txt