Index: /trunk/before.sh
===================================================================
--- /trunk/before.sh	(revision 25)
+++ /trunk/before.sh	(revision 26)
@@ -67,6 +67,18 @@
 #
 # building of directories
-mkdir -p ${dirwww}/images/
-mkdir -p ${dirwww}/php/
+if [ -d ${dirsrc}/images/ ]
+then
+   mkdir -p ${dirwww}/images/
+   mkdir -p ${dirwww}/${lang}//images/ # ++ parce que un niveau de plus que d'haibitude dans les chunck
+fi
+#
+list_php="${dirsrc}/phpversion.php ${dirsrc}/server.php ${dirsrc}/timestamp.php"
+ls ${list_php} 1> /dev/null 2> /dev/null
+exist_php=${?}
+if [ ${exist_php} -eq 0 ]
+then
+   mkdir -p ${dirwww}/php/
+fi
+#
 if [ ${monolingual} = 0 ]
 then
@@ -80,18 +92,16 @@
 fi
 #
-list_php="${dirsrc}/phpversion.php ${dirsrc}/server.php ${dirsrc}/timestamp.php"
-for file_php in ${list_php}
-do
- cp ${file_php} ${dirwww}/php/
-done
+if [ ${exist_php} -eq 0 ]
+then
+   for file_php in ${list_php}
+   do
+     cp ${file_php} ${dirwww}/php/
+   done
+fi
 #
-if [ ${monolingual} = 0 ]
+if [ -d ${dirsrc}/images ]
 then
- mkdir -p ${dirwww}/${lang}//images/ # ++ parce que un niveau de plus que d'haibitude dans les chunck
-cp ${dirsrc}/images/* ${dirwww}/images/
-cp ${dirsrc}/images/* ${dirwww}/${lang}/images/ # ++ parce que un niveau de plus que d'habitude dans les chunck
-else
- mkdir -p ${dirwww}/images/ # ++ parce que un niveau de plus que d'haibitude dans les chunck
- cp ${dirsrc}/images/* ${dirwww}/images/
+   cp ${dirsrc}/images/* ${dirwww}/images/
+   cp ${dirsrc}/images/* ${dirwww}/${lang}/images/ # ++ parce que un niveau de plus que d'habitude dans les chunck
 fi
 #
Index: unk/checklink.sh
===================================================================
--- /trunk/checklink.sh	(revision 25)
+++ 	(revision )
@@ -1,76 +1,0 @@
-#! /bin/sh
-#
-# module :
-# vérification des liens bibnemomaf pré et post-installation
-# cf. install.sh
-#
-# source :
-# /usr/home/fplod/incas/bibnemo/src/bibnemomaf/checklink.sh sur aedon.locean-ipsl.upmc.fr
-#
-# mise à jour :
-# fplod 2007-04-04T14:09:14Z aedon.locean-ipsl.upmc.fr (Darwin)
-# création
-#
-set -u
-set -o posix
-command=$(basename ${0})
-#
-# ++ simu paramètre
-DIRWWW=/usr/temp/${LOGNAME}/public_html/bibnemomaf/
-#
-checklinkopt="--summary --recursive"
-#
-# is checklink available
-type checklink 1> /dev/null 2>&1
-checklink_status=${?}
-if [ ${checklink_status} -ne 0 ]
-then
-   echo "${command} : eee : checklink unavailable"
-   exit 1
-fi
-#
-echo " "
-fverif=${DIRWWW}/en/one/bibnemomaf00.html
-nfverif=www_en_one_bibnemomaf00.html
-echo " Do you want to check ${fverif} (y|[n]) ?"
-answer=" "
-read answer
-case ${answer} in
- Y|y)
- log=/tmp/checklink${nfverif}.log
- err=/tmp/checklink${nfverif}.err
- echo "verif de ${fverif}"
- checklink \
- ${checklinkopt} \
- ${fverif} \
- 1> ${log} 2> ${err}
- echo "iii : log in ${log}"
- ;;
- *)
- echo "no check ${fverif}"
- ;;
-esac
-#
-echo " "
-fverif=${DIRWWW}/en/one/bibnemomaf01.html
-nfverif=www_en_one_bibnemomaf01.html
-echo " Do you want to check ${fverif} (y|[n]) ?"
-answer=" "
-read answer
-case ${answer} in
- Y|y)
- log=/tmp/checklink${nfverif}.log
- err=/tmp/checklink${nfverif}.err
- echo "verif de ${fverif}"
- checklink \
- ${checklinkopt} \
- ${fverif} \
- 1> ${log} 2> ${err}
- echo "iii : log in ${log}"
- ;;
- *)
- echo "no check ${fverif}"
- ;;
-esac
-#
-exit
Index: /trunk/linkchecker.sh
===================================================================
--- /trunk/linkchecker.sh	(revision 25)
+++ /trunk/linkchecker.sh	(revision 26)
@@ -2,77 +2,128 @@
 #
 # module :
-# check links of bibnemomaf before and after installation
+# check links of acmo before and after installation
 # cf. install.sh
 #
 # original location :
-# /usr/home/fplod/incas/bibnemo/src/bibnemomaf/linkchecker.sh sur aedon.locean-ipsl.upmc.fr
+# /usr/home/fplod/locean/acmo/doc/linkchecker.sh sur aedon.locean-ipsl.upmc.fr
 #
-# update ::
-# fplod 2007-04-04T14:09:58Z aedon.locean-ipsl.upmc.fr (Darwin)
-# creation
+# update :
+# ++ linkchecker ne voit pas les erreurs !!
+# ++ dirpublish forme fplod@cerbere.locean-ipsl.upmc.fr:./WWW/ par example
+# donc pas http
+# + ajouter la possibilite rde faire une carte du site avec
+# graphiz
+# exemple synatxe =
+# $ linkchecker -odot -v http://www.lodyc.jussieu.fr/NEMO/general/biblio_new/   | dot -Tps > sitemap.ps
+#
+# fplod 2007-10-12T07:32:08Z aedon.locean-ipsl.upmc.fr (Darwin)
+# add -u pour url
+# add multiple -d and suppression of interactivity
+# replace -w by -d (more generic)
+# use rather checklink than linkchecker because the first one exist either
+# on Mac and Unix, and because the second one exists only on Mac and
+# does'nt seem to detect every problem
+# fplod 2007-10-11T15:31:25Z aedon.locean-ipsl.upmc.fr (Darwin)
+# parametrization
+# merge with checklink.sh ++ choisir entre les deux
+# fplod 2007-06-19T09:26:04Z aedon.locean-ipsl.upmc.fr (Darwin)
+# création
+#
+set -o posix
+command=$(basename ${0} .sh)
+log_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+log=/tmp/${command}.log.${log_date}
+#
+usage=" Usage : ${command} -d dircheck -u url"
+#
+minargcount=2
+#echo " narg ${#}"
+if [ ${#} -lt ${minargcount} ]
+then
+  echo "eee : not enought arguments"
+  echo "${usage}"
+  exit 1
+fi
+#
+idircheck=0
+iurl=0
+while [ ! -z "${1}" ]
+do
+ case ${1} in
+ -d)
+  idircheck=$(( ${idircheck} + 1 ))
+  dircheck[${idircheck}]=${2}
+  shift
+ ;;
+ -u)
+  iurlcheck=$(( ${iurlcheck} + 1 ))
+  urlcheck[${iurlcheck}]=${2}
+  shift
+ ;;
+ esac
+ shift # next flag
+done
 #
 set -u
-set -o posix
-command=$(basename ${0})
 #
-# ++ simu paramètre
-DIRWWW=/usr/temp/${LOGNAME}/public_html/bibnemomaf/
+# ++ check directories or URL
 #
-linkcheckeropt="--anchors --recursion-level=-1"
+# choose the command to be used
 #
-# test if linkchecker is available
-type linkchecker 1> /dev/null 2>&1
-status=${?}
-if [ ${status} -ne 0 ]
+commandcheck=checklink
+#
+if [ ${commandcheck} = "linkchecker" ]
 then
- echo " eee : linkchecker not found"
- exit 1
+   # test if linkchecker is available
+   type ${commandcheck} 1> /dev/null 2>&1
+   status=${?}
+   if [ ${status} -ne 0 ]
+   then
+    echo "${command} : eee : ${commandcheck} unavailable"
+    exit 1
+   fi
+   optcheck="--anchors --recursion-level=-1"
 fi
 #
-echo " "
-#++fverif=${DIRWWW}/en/one/bibnemomaf00.html
-fverif="file://"${DIRWWW}/en/one/bibnemomaf00.html
-nverif=wwwone00
-echo " Do you want to check ${fverif} (y|[n]) ?"
-anwser=" "
-read anwser
-case ${anwser} in
- y|Y)
- log=/tmp/linkchecker${nverif}.log
- err=/tmp/linkchecker${nverif}.err
- echo "iii : check of ${fverif}"
- linkchecker \
- ${linkcheckeropt} \
- ${fverif} \
- 1> ${log} 2> ${err}
- echo "iii : log in ${log}"
- ;;
- *)
- echo "iii : no check of ${fverif}"
- ;;
-esac
+if [ ${commandcheck} = "checklink" ]
+then
+   # test if checklink is available
+   type ${commandcheck} 1> /dev/null 2>&1
+   status=${?}
+   if [ ${status} -ne 0 ]
+   then
+      echo "${command} : eee : ${commandcheck} unavailable"
+      exit 1
+   fi
 #
-echo " "
-#++fverif=${DIRWWW}/en/one/bibnemomaf01.html
-fverif="file://"${DIRWWW}/en/one/bibnemomaf01.html
-nverif=wwwone00
-echo " Do you want to check ${fverif} (y|[n]) ?"
-anwser=" "
-read anwser
-case ${anwser} in
- y|Y)
- log=/tmp/linkchecker${nverif}.log
- err=/tmp/linkchecker${nverif}.err
- echo "iii : check of ${fverif}"
- linkchecker \
- ${linkcheckeropt} \
- ${fverif} \
- 1> ${log} 2> ${err}
- echo "iii : log in ${log}"
- ;;
- *)
- echo "iii : no check of ${fverif}"
- ;;
-esac
+   optcheck="--summary --recursive"
+fi
 #
+# loop on directories to be checked
+dirchecksize=${#dircheck[@]}
+idircheck=1
+while [ ${idircheck} -le ${dirchecksize} ]
+do
+   echo "iii : beginning of check of ${dircheck[${idircheck}]}" 1>>${log}
+   fverif="file://"${dircheck[${idircheck}]}
+   echo "iii : check of ${fverif}"
+   ${commandcheck} ${optcheck} ${fverif} 1>>${log} 2>&1
+   idircheck=$(( ${idircheck} + 1 ))
+done
+#
+# loop on url to be checked
+urlchecksize=${#urlcheck[@]}
+iurlcheck=1
+while [ ${iurlcheck} -le ${urlchecksize} ]
+do
+   echo "iii : beginning of check of ${urlcheck[${iurlcheck}]}" 1>>${log}
+   # ++ test si urlcheck commence par http ou pas
+   fverif=${urlcheck[${iurlcheck}]}
+   echo "iii : check of ${fverif}"
+   ${commandcheck} ${optcheck} ${fverif} 1>>${log} 2>&1
+   iurlcheck=$(( ${iurlcheck} + 1 ))
+done
+#
+echo "iii : log in ${log}"
+# end
 exit
Index: /trunk/makefile
===================================================================
--- /trunk/makefile	(revision 25)
+++ /trunk/makefile	(revision 26)
@@ -7,4 +7,6 @@
 # update :
 # $Id$
+# fplod 2007-10-12T09:40:01Z aedon.locean-ipsl.upmc.fr (Darwin)
+# add linkcheck
 # ++ les dépendences ne marchent pas bien
 # ++ la génération de pdf ne marchent pas bien sans doute à cause des images top
@@ -113,6 +115,13 @@
 	@echo "$ make html_en"
 	@echo "$ make pdf_en"
+	@echo " "
+	@echo "Check links before installation : "
+	@echo "make htmllinkcheckb"
+	@echo " "
 	@echo "Last step = installation"
 	@echo "$ make install"
+	@echo " "
+	@echo "Check links after installation : "
+	@echo "make htmllinkchecka"
 	@echo " "
 	@echo "if you move this product to an other place, "
@@ -126,5 +135,4 @@
 install :
 	./install.sh -w $(DIRWWW) -p $(DIRPUBLISH)
-
 clean :
 	-@rm -fr $(DIRWWW)/
@@ -154,4 +162,10 @@
 	-@rm -f $(DIRTMP)/template_db.xml
 
+htmllinkcheckb :
+	@linkchecker.sh -d $(DIRWWW)
+
+htmllinkchecka :
+	@linkchecker.sh -d $(DIRPUBLISH)
+
 html_en : \
 $(DIRWWW)/en/one/bibnemomain.php \
