Date: Tuesday, March 28, 2006 @ 18:50:59
  Author: marc
    Path: /cvsroot/carob/carob

Modified: publisher.sh (1.5 -> 1.6)

- now able to use either CVS_TAG or CVS_DATE
- removed hard-coded "carob"; adapted for odbsequoia (or others)


--------------+
 publisher.sh |   46 ++++++++++++++++++++++++++++++++++++----------
 1 files changed, 36 insertions(+), 10 deletions(-)


Index: carob/publisher.sh
diff -u carob/publisher.sh:1.5 carob/publisher.sh:1.6
--- carob/publisher.sh:1.5      Tue Mar 28 13:55:11 2006
+++ carob/publisher.sh  Tue Mar 28 18:50:59 2006
@@ -22,33 +22,59 @@
 # set -x
 
 # default values
-: ${CAROB_SUFFIX:=${CAROB_TAG}}
-: ${CAROB_SUFFIX:=`date -I`}
-EXPORT_DIR=carob-${CAROB_SUFFIX}
-: ${CAROB_TAG:=`date -Iseconds`}
 
-printf "Using this carob dirname: ${EXPORT_DIR}\n"
+: ${MODULE:=carob}
 
-# Creates a carob-${CAROB_SUFFIX}.tar.gz file in ../ directory containing
+
+### DIR_SUFFIX ###
+
+# use CVS_TAG if there
+: ${DIR_SUFFIX:=${CVS_TAG}}
+# else use CVS_DATE if there
+: ${DIR_SUFFIX:=${CVS_DATE}}
+# else use current date
+: ${DIR_SUFFIX:=`date -I`}
+
+
+### CVS_ARG ###
+
+# prefix "-r" to CVS_TAG if there
+CVS_TAG=${CVS_TAG:+"-r ${CVS_TAG}"}
+# prefix "-D" to CVS_DATE if there
+CVS_DATE=${CVS_DATE:+"-D ${CVS_DATE}"}
+
+# use CVS_TAG if there
+: ${CVS_ARG:="${CVS_TAG}"}
+# else use CVS_DATE if there
+: ${CVS_ARG:="${CVS_DATE}"}
+# else use current date (with seconds)
+: ${CVS_ARG:="-D `date -Iseconds`"}
+
+
+EXPORT_DIR=${MODULE}-${DIR_SUFFIX}
+printf "Using this ${MODULE} dirname: ${EXPORT_DIR}\n"
+
+
+# Creates a ${MODULE}-${DIR_SUFFIX}.tar.gz file in ../ directory containing
 # the source code from CVS and compiled documentation.
 # Please don't forget to tag the source when releasing such a .tar.gz
 # externally.
 
 function buildsrctarball()
 {
-    printf "Using this carob CVS tag: ${CAROB_TAG}\n"
-    cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/carob export -d ${EXPORT_DIR} 
-D ${CAROB_TAG} carob
+    printf "Using this ${MODULE} CVS version: ${CVS_ARG}\n"
+    cvs -d :pserver:[EMAIL PROTECTED]:/cvsroot/carob export -d ${EXPORT_DIR} 
${CVS_ARG} ${MODULE}
     make -C ${EXPORT_DIR} doc && tar czf ${EXPORT_DIR}.tar.gz ${EXPORT_DIR}
 }
 
 
-# Export doxygen documentation to the web site
+# Export doxygen documentation to the web site. Tested only for MODULE=carob
 # Will fail if buildsrctarball() has not be called before, on purpose:
 # nothing should be published "automatically" without being reviewed first
 
 function publishdoc()
 {
-    cmd="scp -q -rp ${EXPORT_DIR}/doxygen 
forge.continuent.org:/home/groups/carob/doc/carob/doxygen-latest"
+    cmd="scp -q -rp ${EXPORT_DIR}/doxygen 
forge.continuent.org:/home/groups/carob/doc/${MODULE}/doxygen-${DIR_SUFFIX}"
     printf "$0: $cmd\n"
     $cmd
 }

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to