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