Ticket #8131: themestringstool_run.diff

File themestringstool_run.diff, 3.1 KB (added by Kenni Lund <kenni@…>, 14 years ago)
  • themestringstool/run.sh

     
    11#!/bin/bash
    22TS=`pwd`/themestrings
     3MYTHTHEMES=`ls ../myththemes/ --file-type |grep "/$"`
     4XMLPLUGINS="browser-ui.xml dvd-ui.xml gallery-ui.xml game-ui.xml movies-ui.xml \
     5         music-ui.xml mytharchive-ui.xml mythburn-ui.xml netvision-ui.xml \
     6         news-ui.xml video-ui.xml zoneminder-ui.xml weather-ui.xml"
    37
     8# mythtv: Exclude mythplugins directory and myththemes files related to plugins
    49pushd ..
    510    chmod a-x mythplugins
     11    for I in ${MYTHTHEMES}; do
     12        for J in ${XMLPLUGINS}; do
     13            [ -e myththemes/${I}${J} ] && chmod a-r myththemes/${I}${J}
     14        done
     15    done
    616popd > /dev/null
    717
     18echo "-------------------------------------------------------------------------"
     19echo "\"Can't open [plugin-specific xml-file]\" error messages are expected below"
     20echo "-------------------------------------------------------------------------"
    821pushd ../mythtv/themes
    922    $TS ../.. . > /dev/null
    1023popd > /dev/null
    1124
     25echo "-------------------------------------------------------------------------"
     26echo "...until this point"
     27echo "-------------------------------------------------------------------------"
     28
    1229pushd ..
    1330    chmod a+x mythplugins
     31    for I in ${MYTHTHEMES}; do
     32        for J in ${XMLPLUGINS}; do
     33            [ -e myththemes/${I}${J} ] && chmod a+r myththemes/${I}${J}
     34        done
     35    done
    1436popd > /dev/null
    1537
    16 # exclude mythweather us_nws strings
    17 chmod a-r ../mythplugins/mythweather/mythweather/scripts/us_nws/maps.xml
    1838
    19 for I in `ls ../mythplugins --file-type | grep "/$" | grep -v cleanup | grep -v mythweb` ; do
    20     pushd ../mythplugins/$I
     39# updateplugin plugindir [xml file] [xml file]
     40function updateplugin {
     41    pushd ../mythplugins/$1
     42    mkdir temp_themestrings > /dev/null 2>&1
     43    COUNT=0
     44    [ -n "$2" ] && for i in `echo ../../myththemes/*/${2}`; do
     45        cp $i temp_themestrings/${COUNT}-${2}
     46        COUNT=$((COUNT+1))
     47    done
     48
     49    [ -n "$3" ] && for i in `echo ../../myththemes/*/${3}`; do
     50        cp $i temp_themestrings/${COUNT}-${3}
     51        COUNT=$((COUNT+1))
     52    done
     53
    2154    $TS . `pwd`/i18n > /dev/null
     55   
     56    rm -rf temp_themestrings
     57   
    2258    popd > /dev/null
    23 done
     59}
    2460
     61# exclude mythweather us_nws strings
     62chmod a-r ../mythplugins/mythweather/mythweather/scripts/us_nws/maps.xml
     63
     64updateplugin mytharchive mytharchive-ui.xml mythburn-ui.xml
     65updateplugin mythbrowser browser-ui.xml
     66updateplugin mythgallery gallery-ui.xml
     67updateplugin mythgame game-ui.xml
     68updateplugin mythmovies movies-ui.xml
     69updateplugin mythmusic music-ui.xml
     70updateplugin mythnetvision netvision-ui.xml
     71updateplugin mythnews news-ui.xml
     72updateplugin mythvideo dvd-ui.xml video-ui.xml
     73updateplugin mythweather weather-ui.xml
     74updateplugin mythzoneminder zoneminder-ui.xml  #zoneminder-ui.xml doesn't exist at the moment, but it's included for future use
     75
    2576chmod a+r ../mythplugins/mythweather/mythweather/scripts/us_nws/maps.xml
    2677
    2778pushd .. > /dev/null