Diff for /mailredirect/src/make-lang.sh between versions 1.1 and 1.2

version 1.1, 2004/11/15 15:02:32 version 1.2, 2005/09/19 09:01:44
Line 7 Line 7
 # if you want to debug this script, set DEBUG to something >0  # if you want to debug this script, set DEBUG to something >0
 DEBUG=0  DEBUG=0
   
   MAILREDIRECTVERSION=${2:-`cat version.txt`}
   export MAILREDIRECTVERSION
   
 if [ $# -gt 2 -o $# -lt 1 ]; then  if [ $# -gt 2 -o $# -lt 1 ]; then
   echo "Usage: $0 xx-YY [version]"    echo "Usage: $0 xx-YY [version]"
   echo "       where: xx-YY   is the language and country code representing the"    echo "       where: xx-YY   is the language and country code representing the"
   echo "                      translated language (e.g. pl-PL, de-DE, es-ES)"    echo "                      translated language (e.g. pl-PL, de-DE, es-ES)"
  echo "              version (optional) is the Mail Redirect version, e.g. 0.1.9"  echo "              version (optional) is the Mail Redirect version, e.g. ${MAILREDIRECTVERSION}"
  echo "                      if parameter is not given version from version.txt is taken"  echo "                      if parameter is not given value from version.txt is taken"
   exit 1    exit 1
 fi  fi
   
 MAILREDIRECTLANG=$1  MAILREDIRECTLANG=$1
 export MAILREDIRECTLANG  export MAILREDIRECTLANG
   
MAILREDIRECTVERSION=${2:-`cat version.txt`}LANGDIR=${MAILREDIRECTLANG}/chrome/locale/${MAILREDIRECTLANG}
export MAILREDIRECTVERSION 
 
LANGDIR=${MAILREDIRECTLANG}/chrome/locale/${MAILREDIRECTLANG}/mailredirect 
 cwd=`pwd`  cwd=`pwd`
 rm -rf ${LANGDIR} >/dev/null 2>&1  rm -rf ${LANGDIR} >/dev/null 2>&1
 mkdir -p ${LANGDIR}   mkdir -p ${LANGDIR} 
Line 32  export LANGHASH Line 32  export LANGHASH
   
 # create install.js  # create install.js
 cat > ${MAILREDIRECTLANG}/install.js <<EOT  cat > ${MAILREDIRECTLANG}/install.js <<EOT
// Install script for Enigmail ${MAILREDIRECTLANG} language pack// Install script for mailredirect ${MAILREDIRECTLANG} language pack
   
 // 1. Set parameters of package installation  // 1. Set parameters of package installation
 const APP_DISPLAY_NAME = "Mail Redirect ${MAILREDIRECTLANG} language pack";  const APP_DISPLAY_NAME = "Mail Redirect ${MAILREDIRECTLANG} language pack";
Line 41  const APP_VERSION = "${MAILREDIRECTVERSI Line 41  const APP_VERSION = "${MAILREDIRECTVERSI
   
 const APP_PACKAGE = "/" + APP_NAME;  const APP_PACKAGE = "/" + APP_NAME;
 const APP_JAR_FILE = APP_NAME + "-${MAILREDIRECTLANG}.jar";  const APP_JAR_FILE = APP_NAME + "-${MAILREDIRECTLANG}.jar";
const APP_CONTENT_FOLDER = "content" + APP_PACKAGE + "/";const APP_CONTENT_FOLDER = "content/";
const APP_LOCALE_FOLDER = "locale/${MAILREDIRECTLANG}" + APP_PACKAGE + "/";const APP_LOCALE_FOLDER = "locale/${MAILREDIRECTLANG}/";
   
   
 const INST_TO_PROFILE = "Do you wish to install "+APP_DISPLAY_NAME+" to your profile?\nThis will mean it does not need reinstalling when you update your application.\n(Click Cancel if you want "+APP_DISPLAY_NAME+" installing to the application directory.)";  const INST_TO_PROFILE = "Do you wish to install "+APP_DISPLAY_NAME+" to your profile?\nThis will mean it does not need reinstalling when you update your application.\n(Click Cancel if you want "+APP_DISPLAY_NAME+" installing to the application directory.)";
Line 112  cat > ${MAILREDIRECTLANG}/install.rdf << Line 112  cat > ${MAILREDIRECTLANG}/install.rdf <<
   
     <em:file>      <em:file>
       <Description about="urn:mozilla:extension:file:mailredirect-${MAILREDIRECTLANG}.jar">        <Description about="urn:mozilla:extension:file:mailredirect-${MAILREDIRECTLANG}.jar">
        <em:locale>locale/${MAILREDIRECTLANG}/mailredirect/</em:locale>        <em:locale>locale/${MAILREDIRECTLANG}/</em:locale>
       </Description>        </Description>
     </em:file>      </em:file>
           
Line 120  cat > ${MAILREDIRECTLANG}/install.rdf << Line 120  cat > ${MAILREDIRECTLANG}/install.rdf <<
       <Description>        <Description>
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>          <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
         <em:minVersion>0.7</em:minVersion>          <em:minVersion>0.7</em:minVersion>
        <em:maxVersion>1.2</em:maxVersion>        <em:maxVersion>1.6+</em:maxVersion>
       </Description>        </Description>
     </em:targetApplication>      </em:targetApplication>
       
Line 151  cat >${LANGDIR}/contents.rdf <<EOT Line 151  cat >${LANGDIR}/contents.rdf <<EOT
 </RDF:RDF>   </RDF:RDF> 
 EOT  EOT
   
cd ${cwd}/locale/en-US/mailredirectcat >${LANGDIR}/chrome.manifest <<EOT
 locale  mailredirect    ${MAILREDIRECTLANG}     jar:chrome/mailredirect-${MAILREDIRECTLANG}.jar!/locale/${MAILREDIRECTLANG}/
 EOT
 
 cd ${cwd}/locale/en-US
 for f in aw.dtd mailredirect.dtd mailredirect-compose.dtd mailredirect-compose.properties mailredirect-prefs.dtd mailredirect-prefs.properties ; do  for f in aw.dtd mailredirect.dtd mailredirect-compose.dtd mailredirect-compose.properties mailredirect-prefs.dtd mailredirect-prefs.properties ; do
   cp ${f} ${cwd}/${LANGDIR}    cp ${f} ${cwd}/${LANGDIR}
 done  done
Line 159  done Line 163  done
 cd ${cwd}/${MAILREDIRECTLANG}/chrome  cd ${cwd}/${MAILREDIRECTLANG}/chrome
 zip -r -D mailredirect-${MAILREDIRECTLANG}.jar locale  zip -r -D mailredirect-${MAILREDIRECTLANG}.jar locale
 cd ..  cd ..
zip ../mailredirect-${MAILREDIRECTLANG}-${MAILREDIRECTVERSION}.xpi install.js install.rdf chrome/mailredirect-${MAILREDIRECTLANG}.jarzip ../mailredirect-${MAILREDIRECTLANG}-${MAILREDIRECTVERSION}.xpi install.js install.rdf chrome.manifest chrome/mailredirect-${MAILREDIRECTLANG}.jar
 cd ..  cd ..
   
 test $DEBUG -eq 0 && rm -rf ${MAILREDIRECTLANG}  test $DEBUG -eq 0 && rm -rf ${MAILREDIRECTLANG}
   

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>