changeset 762:605af0a90e3e

Minor fix
author Dongsheng Song <songdongsheng@live.cn>
date Tue, 31 Mar 2009 11:51:13 +0800
parents bc9dc4f2f912
children 4dd63ae7ba87
files Makefile contrib/hg-package
diffstat 2 files changed, 20 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Mar 31 11:11:43 2009 +0800
+++ b/Makefile	Tue Mar 31 11:51:13 2009 +0800
@@ -159,7 +159,7 @@
 	mkdir -p build/$(LINGUA)/source/figs
 	cp en/figs/*.png build/$(LINGUA)/source/figs
 	cp stylesheets/hgbook.css build/$(LINGUA)/source
-	$(TRANSLATE) -m build/en/source/hgbook.xml -p po/$(LINGUA).po -l $@.tmp
+	$(TRANSLATE) -m build/en/source/hgbook.xml.tmp -p po/$(LINGUA).po -l $@.tmp
 	cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@
 endif
 
--- a/contrib/hg-package	Tue Mar 31 11:11:43 2009 +0800
+++ b/contrib/hg-package	Tue Mar 31 11:51:13 2009 +0800
@@ -27,12 +27,19 @@
      cp pdf/hgbook.pdf ../hgbook-${l}-${rev_id}.pdf
      gzip -f9 ../hgbook-${l}-${rev_id}.pdf
   fi
+
+  if [ -f "epub/hgbook.epub" ] ; then
+     cp epub/hgbook.epub ../hgbook-${l}-${rev_id}.epub
+  fi
   )
 done
 
 upload_pass=$1
 upload_user=$2
 
+# echo "upload_pass: ${upload_pass}"
+# echo "upload_user: ${upload_user}"
+
 if [ "${upload_user}x" == "x" ]; then
   upload_user="dongsheng.song"
 fi
@@ -46,17 +53,24 @@
   fi
 
   for l in en zh; do
+    if [ -f "hgbook-${l}-${rev_id}.epub" ] ; then
+      python googlecode_upload.py --user="${upload_user}" --password="${upload_pass}" \
+          -p "i18n-zh" -l "Type-Docs,book,hgbook,hg,mercurial,ebook" \
+          -s "Distributed revision control with Mercurial - ${l} - ePub" \
+          hgbook-${l}-${rev_id}.epub
+    fi
+
     if [ -f "hgbook-${l}-${rev_id}.pdf.gz" ] ; then
-      python googlecode_upload.py -u "dongsheng.song" -w "$1" \
-          -p "i18n-zh" -l "Type-Docs,hgbook" \
+      python googlecode_upload.py --user="${upload_user}" --password="${upload_pass}" \
+          -p "i18n-zh" -l "Type-Docs,book,hgbook,hg,mercurial" \
           -s "Distributed revision control with Mercurial - ${l} - pdf" \
           hgbook-${l}-${rev_id}.pdf.gz
     fi
 
     for f in html html-single; do
-      if [ -f "hgbook-${l}-${rev_id}.pdf.gz" ] ; then
-        python googlecode_upload.py -u "dongsheng.song" -w "$1" \
-            -p "i18n-zh" -l "Type-Docs,hgbook" \
+      if [ -f "hgbook-${l}-${f}-${rev_id}.tar.gz" ] ; then
+        python googlecode_upload.py --user="${upload_user}" --password="${upload_pass}" \
+            -p "i18n-zh" -l "Type-Docs,book,hgbook,hg,mercurial" \
             -s "Distributed revision control with Mercurial - ${l} - ${f}" \
             hgbook-${l}-${f}-${rev_id}.tar.gz
       fi