mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-21 17:39:09 +01:00
Remove useless old docbook doc scripts
This commit is contained in:
parent
aa197983a1
commit
c60730f25c
3 changed files with 0 additions and 249 deletions
40
buildDoc.sh
40
buildDoc.sh
|
@ -1,40 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
ROOT_DIR=$( cd `dirname $0`; pwd )
|
||||
LOCAL_CFG_DIR=$ROOT_DIR/config.local
|
||||
|
||||
# Import config
|
||||
if [ ! -f $LOCAL_CFG_DIR/local.sh ]
|
||||
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."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source $LOCAL_CFG_DIR/local.sh
|
||||
|
||||
cd $ROOT_DIR/doc
|
||||
|
||||
make clean >> $LOG_FILE 2>&1
|
||||
make >> $LOG_FILE 2>&1 &
|
||||
|
||||
export P=$!
|
||||
|
||||
|
||||
trap exitwhell INT
|
||||
|
||||
function exitwhell() {
|
||||
kill -9 $P 2> /dev/null
|
||||
echo " -- INT -- "
|
||||
}
|
||||
|
||||
while [ -d /proc/$P ]
|
||||
do
|
||||
echo -n .
|
||||
sleep 1
|
||||
done
|
||||
echo done.
|
||||
|
||||
if [ -n "$EXPORT_DOC_DIR" ]
|
||||
then
|
||||
$ROOT_DIR/buildDocExports.sh
|
||||
fi
|
|
@ -1,167 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
ROOT_DIR=$( cd `dirname $0`; pwd )
|
||||
LOCAL_CFG_DIR=$ROOT_DIR/config.local
|
||||
|
||||
# Import config
|
||||
if [ ! -f $LOCAL_CFG_DIR/local.sh ]
|
||||
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."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source $LOCAL_CFG_DIR/local.sh
|
||||
|
||||
if [ ! -n "$EXPORT_DOC_DIR" ]
|
||||
then
|
||||
echo "The EXPORT_DOC_DIR variable is not define. Export doc is disabled."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -d "$EXPORT_DOC_DIR" ]
|
||||
then
|
||||
echo "Error : Export directory $EXPORT_DOC_DIR does not exist !"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
DOC_DIR=$ROOT_DIR/doc
|
||||
TMP_DIR=`mktemp -d`
|
||||
ERROR=0
|
||||
|
||||
echo "-> Export documentation in $EXPORT_DOC_DIR :"
|
||||
|
||||
# PDF
|
||||
if [ -n "$PDF" ]
|
||||
then
|
||||
echo -en "\t- PDF : "
|
||||
# PDF
|
||||
cp -f $DOC_DIR/exports/pdf/LdapSaisie.pdf $EXPORT_DOC_DIR/LdapSaisie.pdf
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo -e "\n-> Error"
|
||||
ERROR=1
|
||||
else
|
||||
echo Ok
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# EPUB
|
||||
if [ -n "$EPUB" ]
|
||||
then
|
||||
echo -en "\t- EPUB : "
|
||||
# EPUB
|
||||
cp -f $DOC_DIR/exports/epub/LdapSaisie.epub $EXPORT_DOC_DIR/LdapSaisie.epub
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo -e "\n-> Error"
|
||||
ERROR=1
|
||||
else
|
||||
echo Ok
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# ALL-IN-ONE
|
||||
if [ -n "$ALL_IN_ONE" ]
|
||||
then
|
||||
echo -en "\t- All-In-One : "
|
||||
rm -fr $TMP_DIR/$ALL_IN_ONE
|
||||
mkdir $TMP_DIR/$ALL_IN_ONE
|
||||
|
||||
cp $DOC_DIR/exports/html/all-in-one/LdapSaisie.html $TMP_DIR/$ALL_IN_ONE/
|
||||
sed -i 's/\.\.\/\.\.\/\.\.\///g' $TMP_DIR/$ALL_IN_ONE/LdapSaisie.html
|
||||
|
||||
# IMAGES
|
||||
cp -fr $IMAGES $TMP_DIR/$ALL_IN_ONE/images
|
||||
|
||||
mkdir $TMP_DIR/$ALL_IN_ONE/styles
|
||||
cp $CSS $TMP_DIR/$ALL_IN_ONE/styles/
|
||||
|
||||
echo "done. Build archive and move it later ..."
|
||||
fi
|
||||
|
||||
|
||||
# ONLINE
|
||||
if [ -n "$ONLINE" ]
|
||||
then
|
||||
echo -en "\t- On-line : "
|
||||
rm -fr $TMP_DIR/$ONLINE
|
||||
mkdir $TMP_DIR/$ONLINE
|
||||
|
||||
cp -fr $DOC_DIR/exports/html/online/*.html $TMP_DIR/$ONLINE
|
||||
sed -i 's/\.\.\/\.\.\/\.\.\///g' $TMP_DIR/$ONLINE/*
|
||||
|
||||
# IMAGES
|
||||
cp -fr $IMAGES $TMP_DIR/$ONLINE/images
|
||||
|
||||
mkdir $TMP_DIR/$ONLINE/styles
|
||||
cp $CSS $TMP_DIR/$ONLINE/styles/
|
||||
|
||||
echo "done. Build archive and move it later ..."
|
||||
fi
|
||||
|
||||
|
||||
# DOCBOOK
|
||||
if [ -n "$DOCBOOK" ]
|
||||
then
|
||||
echo -en "\t- Docbook : "
|
||||
|
||||
rm -fr $TMP_DIR/$DOCBOOK
|
||||
mkdir $TMP_DIR/$DOCBOOK
|
||||
|
||||
cd $DOC_DIR
|
||||
for i in `find -type d|grep -v 'export'`
|
||||
do
|
||||
mkdir -p $TMP_DIR/$DOCBOOK/$i
|
||||
done
|
||||
|
||||
for i in `find -type f|egrep -v '(Makefile|^./export)'`
|
||||
do
|
||||
cp $i $TMP_DIR/$DOCBOOK/$i
|
||||
done
|
||||
|
||||
echo "done. Build archive and move it later ..."
|
||||
fi
|
||||
|
||||
echo "-> Build archives and move all in export directory :"
|
||||
cd $TMP_DIR/
|
||||
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/
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo Ok
|
||||
else
|
||||
echo -e "\n-> Error"
|
||||
ERROR=1
|
||||
fi
|
||||
|
||||
echo -en "\t\t+ Web dir : "
|
||||
[ ! -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 -e "\n-> Error"
|
||||
ERROR=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$LAST_UPDATE_FILE" ]
|
||||
then
|
||||
echo -n "-> Create last-update file : "
|
||||
echo "Last update :" > $LAST_UPDATE_FILE
|
||||
date >> $LAST_UPDATE_FILE
|
||||
cd $ROOT_DIR
|
||||
git log|head -n 1 >> $LAST_UPDATE_FILE
|
||||
echo >> $LAST_UPDATE_FILE
|
||||
echo done.
|
||||
fi
|
||||
|
||||
rm -fr $TMP_DIR
|
||||
|
||||
exit $ERROR
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
ROOT_DIR=$( cd `dirname $0`; pwd )
|
||||
LOCAL_CFG_DIR=$ROOT_DIR/config.local
|
||||
|
||||
# Import config
|
||||
if [ ! -f $LOCAL_CFG_DIR/local.sh ]
|
||||
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."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source $LOCAL_CFG_DIR/local.sh
|
||||
|
||||
if [ ! -n "$EXPORT_DOC_DIR" ]
|
||||
then
|
||||
echo "The EXPORT_DOC_DIR variable is not define. Export doc is disabled."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -d "$EXPORT_DOC_DIR" ]
|
||||
then
|
||||
echo "Error : Export directory $EXPORT_DOC_DIR does not exist !"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ ! -n "$LAST_UPDATE_FILE" ]
|
||||
then
|
||||
echo "Error : The LAST_UPDATE_FILE is necessary for update detection !"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
cd $ROOT_DIR
|
||||
|
||||
CURRENT=`grep ^commit $LAST_UPDATE_FILE | cut -d ' ' -f 2`
|
||||
if [ "`git diff $CURRENT -- doc`" != "" ]
|
||||
then
|
||||
echo "Export documentation is necessary"
|
||||
echo "================================="
|
||||
echo "Current doc exports was generated from the commit $CURRENT."
|
||||
echo "Changes have been made since."
|
||||
fi
|
Loading…
Reference in a new issue