Changeset 18741


Ignore:
Timestamp:
03/23/09 12:30:17 (12 years ago)
Author:
oranfry
Message:

improved generate-pdf scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/trunk/manuals/generate-pdf.sh

    r17494 r18741  
    1 #!/bin/sh
     1#!/bin/bash
    22
    33top_dir=`pwd`
     
    1313fi
    1414
    15 langs="en es ru fr ar"
    16 manuals="Paper User Develop  Install"
    17 
    18 if [ "$1" != "" ]; then
    19     cmd=$1
     15#sus out what manuals to build
     16all_manuals="Paper User Develop  Install"
     17if [ "$1" == "all" ]; then
     18    manuals=$all_manuals
     19elif [ "$1" != "" ]; then
     20    manuals=$1
    2021else
    21     echo -e "choose a manual to work with: \n 'all' for all the manuals\n 'u' for the User's Guide\n 'd' for the Developer's Guide\n 'i' for the Installer's Guide\n 'p' for From Paper to Collection"
    22     read cmd
     22    echo "choose a manual to work with:"
     23    echo "'all'      for all the manuals"
     24    echo "'User'     for the User's Guide"
     25    echo "'Develop'  for the Developer's Guide"
     26    echo "'Install'  for the Installer's Guide"
     27    echo "'Paper'    for From Paper to Collection"
     28    echo -n "> "
     29    read manuals
     30    if [ "$manuals" == "all" ]; then
     31        manuals=$all_manuals
     32    fi
    2333fi
    2434
    25 if [ $cmd = 'u' ]; then
    26     manuals="User"
    27 fi
    28 if [ $cmd = 'd' ]; then
    29     manuals="Develop"
    30 fi
    31 if [ $cmd = 'i' ]; then
    32     manuals="Install"
    33 fi
    34 if [ $cmd = 'p' ]; then
    35     manuals="Paper"
     35#sus out what languages to build in
     36all_langs="en es ru fr ar"
     37if [ "$2" == "all" ]; then
     38    langs=$all_langs
     39
     40elif [ "$2" != "" ]; then
     41        langs=$2
     42else
     43    echo "choose a language to work with out of: $all_langs"
     44    echo "choose 'all' for all languages"
     45    echo -n "> "
     46    read langs
     47    if [ "$langs" == "all" ]; then
     48        langs=$all_langs
     49    fi
    3650fi
    3751
    38 
    39 if [ "$2" != "" ]; then
    40         langs=$2
    41 else
    42     echo -e "choose a language to work with: \n all, en, fr, es, or ru"
    43     read cmd
    44     if [ $cmd != 'all' ]; then
    45         langs=$cmd
    46     fi
    47 fi
     52echo "Manuals: $manuals"
     53echo "Languages: $langs"
     54echo
    4855
    4956for l in $langs; do
     
    5764       
    5865    for m in $manuals; do
    59         echo -e "\nprocessing the $m manual in $l"
     66        echo "Processing the $m manual in $l"
    6067        $fop_dir/fop.sh -c $shared_dir/fop/conf/userconfig.xml -q -xsl $processing_dir/xml-to-pdf.xsl -xml $source_dir/$l/"$m"_"$l".xml -pdf $output_dir/$l/pdf/"$m"_"$l".pdf
    61         echo -e "done!\n"
     68        echo "done"
    6269    done
    6370done
Note: See TracChangeset for help on using the changeset viewer.