upgradeFromGit/buildDocExports : fix bugs

This commit is contained in:
Benjamin Renard 2009-11-13 18:14:14 +01:00
parent 0c503cbeee
commit f7b6fbe143
2 changed files with 13 additions and 12 deletions

View file

@ -1,15 +1,16 @@
#!/bin/sh #!/bin/sh
ROOT_DIR=$( cd `dirname $0`; pwd ) ROOT_DIR=$( cd `dirname $0`; pwd )
LOCAL_CFG_DIR=$ROOT_DIR/config.local
# Import config # Import config
if [ ! -f $LOCAL_SAV_DIR/local.sh ] if [ ! -f $LOCAL_CFG_DIR/local.sh ]
then then
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." 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."
exit 1 exit 1
fi fi
source $LOCAL_SAV_DIR/local.sh source $LOCAL_CFG_DIR/local.sh
if [ ! -n "$EXPORT_DOC_DIR" ] if [ ! -n "$EXPORT_DOC_DIR" ]
then then
@ -21,7 +22,7 @@ DOC_DIR=$ROOT_DIR/doc
TMP_DIR=`mktemp -d` TMP_DIR=`mktemp -d`
ERROR=0 ERROR=0
echo "Export documentation in $EXPORT_DOC_DIR :" echo "-> Export documentation in $EXPORT_DOC_DIR :"
# PDF # PDF
if [ -n "$PDF" ] if [ -n "$PDF" ]
@ -55,7 +56,7 @@ then
mkdir $TMP_DIR/$ALL_IN_ONE/styles mkdir $TMP_DIR/$ALL_IN_ONE/styles
cp $CSS $TMP_DIR/$ALL_IN_ONE/styles/ cp $CSS $TMP_DIR/$ALL_IN_ONE/styles/
echo "Build archive and move it later ..." echo "done. Build archive and move it later ..."
fi fi
@ -75,7 +76,7 @@ then
mkdir $TMP_DIR/$ONLINE/styles mkdir $TMP_DIR/$ONLINE/styles
cp $CSS $TMP_DIR/$ONLINE/styles/ cp $CSS $TMP_DIR/$ONLINE/styles/
echo "Build archive and move it later ..." echo "done. Build archive and move it later ..."
fi fi
@ -98,10 +99,10 @@ then
cp $i $TMP_DIR/$DOCBOOK/$i cp $i $TMP_DIR/$DOCBOOK/$i
done done
echo "Build archive and move it later ..." echo "done. Build archive and move it later ..."
fi fi
echo "Build archives and move all in export directory :" echo "-> Build archives and move all in export directory :"
cd $TMP_DIR/ cd $TMP_DIR/
for i in $ALL_IN_ONE $ONLINE $DOCBOOK for i in $ALL_IN_ONE $ONLINE $DOCBOOK
do do
@ -129,7 +130,7 @@ done
if [ -n "$LAST_UPDATE_FILE" ] if [ -n "$LAST_UPDATE_FILE" ]
then then
echo -n "Create last-update file : " echo -n "-> Create last-update file : "
echo "Last update :" > $LAST_UPDATE_FILE echo "Last update :" > $LAST_UPDATE_FILE
date >> $LAST_UPDATE_FILE date >> $LAST_UPDATE_FILE
echo >> $LAST_UPDATE_FILE echo >> $LAST_UPDATE_FILE

View file

@ -19,7 +19,7 @@ function msg() {
cd $ROOT_DIR cd $ROOT_DIR
msg "Clean git repos : " msg "-> Clean git repos : "
for i in $LOCAL_FILES for i in $LOCAL_FILES
do do
msg "\t-> $i : " -en msg "\t-> $i : " -en
@ -77,7 +77,7 @@ then
fi fi
fi fi
msg "Verification of git repos state : " msg "-> Verification of git repos state : "
git status >> $LOG_FILE 2>&1 git status >> $LOG_FILE 2>&1
if [ "$ETAT" != "" ] if [ "$ETAT" != "" ]
then then
@ -86,7 +86,7 @@ then
fi fi
msg "\t->[OK]" -e msg "\t->[OK]" -e
msg "Upgrade git repos : " msg "-> Upgrade git repos : "
RES_GIT=`git pull` RES_GIT=`git pull`
RES=$? RES=$?
msg "$RES_GIT" -e msg "$RES_GIT" -e
@ -97,7 +97,7 @@ then
fi fi
msg "\t-> [OK]" -e msg "\t-> [OK]" -e
msg "Install local files : " msg "-> Install local files : "
for i in $LOCAL_FILES for i in $LOCAL_FILES
do do
msg "\t-> $i : " -ne msg "\t-> $i : " -ne