hgbook

diff contrib/hg-package @ 661:65b82a891cf7

Add epub format
author Dongsheng Song <dongsheng.song@gmail.com>
date Tue Mar 31 11:04:18 2009 +0800 (2009-03-31)
parents d1a6ed326f87
children 605af0a90e3e
line diff
     1.1 --- a/contrib/hg-package	Fri Mar 13 16:01:21 2009 +0800
     1.2 +++ b/contrib/hg-package	Tue Mar 31 11:04:18 2009 +0800
     1.3 @@ -4,7 +4,12 @@
     1.4  rev_id=`hg parents --template '{date|shortdate}' | sed 's/-//g'`
     1.5  
     1.6  for l in en zh; do
     1.7 -  (cd ${build_dir}/${l};
     1.8 +  (
     1.9 +  if [ ! -d "${build_dir}/${l}" ] ; then
    1.10 +    continue
    1.11 +  fi
    1.12 +
    1.13 +  cd ${build_dir}/${l};
    1.14  
    1.15    f='html'
    1.16    if [ -f "${f}/index.html" ] ; then
    1.17 @@ -35,19 +40,26 @@
    1.18  if [ "${upload_pass}x" != "x" ]; then
    1.19    (
    1.20    cd ${build_dir}
    1.21 -  curl -O http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py
    1.22 +  curl -s -O http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py
    1.23 +  if [[ "0" != $? ]]; then
    1.24 +    exit 1
    1.25 +  fi
    1.26  
    1.27    for l in en zh; do
    1.28 -    python googlecode_upload.py -u "dongsheng.song" -w "$1" \
    1.29 -      -p "i18n-zh" -l "Type-Docs,hgbook" \
    1.30 -      -s "Distributed revision control with Mercurial - ${l} - pdf" \
    1.31 -      hgbook-${l}-${rev_id}.pdf.gz
    1.32 +    if [ -f "hgbook-${l}-${rev_id}.pdf.gz" ] ; then
    1.33 +      python googlecode_upload.py -u "dongsheng.song" -w "$1" \
    1.34 +          -p "i18n-zh" -l "Type-Docs,hgbook" \
    1.35 +          -s "Distributed revision control with Mercurial - ${l} - pdf" \
    1.36 +          hgbook-${l}-${rev_id}.pdf.gz
    1.37 +    fi
    1.38  
    1.39      for f in html html-single; do
    1.40 -      python googlecode_upload.py -u "dongsheng.song" -w "$1" \
    1.41 -        -p "i18n-zh" -l "Type-Docs,hgbook" \
    1.42 -        -s "Distributed revision control with Mercurial - ${l} - ${f}" \
    1.43 -        hgbook-${l}-${f}-${rev_id}.tar.gz
    1.44 +      if [ -f "hgbook-${l}-${rev_id}.pdf.gz" ] ; then
    1.45 +        python googlecode_upload.py -u "dongsheng.song" -w "$1" \
    1.46 +            -p "i18n-zh" -l "Type-Docs,hgbook" \
    1.47 +            -s "Distributed revision control with Mercurial - ${l} - ${f}" \
    1.48 +            hgbook-${l}-${f}-${rev_id}.tar.gz
    1.49 +      fi
    1.50      done
    1.51    done
    1.52    )