3 ROOT_DIR=$( cd `dirname $0`; pwd )
6 if [ ! -f $LOCAL_SAV_DIR/local.sh ]
8 echo "Error : You don't have create your own local.sh file in config.local directory. You could rely on the local.sh.example file to create your version."
12 source $LOCAL_SAV_DIR/local.sh
14 if [ ! -n "$EXPORT_DOC_DIR" ]
16 echo "The EXPORT_DOC_DIR variable is not define. Export doc is disabled."
24 echo "Export documentation in $EXPORT_DOC_DIR :"
31 cp -f $DOC_DIR/exports/pdf/LdapSaisie.pdf $EXPORT_DOC_DIR/LdapSaisie.pdf
43 if [ -n "$ALL_IN_ONE" ]
45 echo -en "\t- All-In-One : "
46 rm -fr $TMP_DIR/$ALL_IN_ONE
47 mkdir $TMP_DIR/$ALL_IN_ONE
49 cp $DOC_DIR/exports/html/all-in-one/LdapSaisie.html $TMP_DIR/$ALL_IN_ONE/
50 sed -i 's/\.\.\/\.\.\/\.\.\///g' $TMP_DIR/$ALL_IN_ONE/LdapSaisie.html
53 cp -fr $IMAGES $TMP_DIR/$ALL_IN_ONE/images
55 mkdir $TMP_DIR/$ALL_IN_ONE/styles
56 cp $CSS $TMP_DIR/$ALL_IN_ONE/styles/
58 echo "Build archive and move it later ..."
65 echo -en "\t- On-line : "
66 rm -fr $TMP_DIR/$ONLINE
67 mkdir $TMP_DIR/$ONLINE
69 cp -fr $DOC_DIR/exports/html/online/*.html $TMP_DIR/$ONLINE
70 sed -i 's/\.\.\/\.\.\/\.\.\///g' $TMP_DIR/$ONLINE/*
73 cp -fr $IMAGES $TMP_DIR/$ONLINE/images
75 mkdir $TMP_DIR/$ONLINE/styles
76 cp $CSS $TMP_DIR/$ONLINE/styles/
78 echo "Build archive and move it later ..."
85 echo -en "\t- Docbook : "
87 rm -fr $TMP_DIR/$DOCBOOK
88 mkdir $TMP_DIR/$DOCBOOK
91 for i in `find -type d|grep -v 'export'`
93 mkdir -p $TMP_DIR/$DOCBOOK/$i
96 for i in `find -type f|grep -v '(Makefile|^./export)'`
98 cp $i $TMP_DIR/$DOCBOOK/$i
101 echo "Build archive and move it later ..."
104 echo "Build archives and move all in export directory :"
106 for i in $ALL_IN_ONE $ONLINE $DOCBOOK
109 echo -en "\t\t+ Archive : "
110 tar -cjf LdapSaisie--Doc--$i.tar.bz2 $i && mv LdapSaisie--Doc--$i.tar.bz2 $EXPORT_DOC_DIR/
119 echo -en "\t\t+ Web dir : "
120 rm -fr $EXPORT_DOC_DIR/$i/* && cp -fr $i/* $EXPORT_DOC_DIR/$i/ && rm -fr $i
130 if [ -n "$LAST_UPDATE_FILE" ]
132 echo -n "Create last-update file : "
133 echo "Last update :" > $LAST_UPDATE_FILE
134 date >> $LAST_UPDATE_FILE
135 echo >> $LAST_UPDATE_FILE