Ticket #8131: themestringstool_run.diff
File themestringstool_run.diff, 3.1 KB (added by , 14 years ago) |
---|
-
themestringstool/run.sh
1 1 #!/bin/bash 2 2 TS=`pwd`/themestrings 3 MYTHTHEMES=`ls ../myththemes/ --file-type |grep "/$"` 4 XMLPLUGINS="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" 3 7 8 # mythtv: Exclude mythplugins directory and myththemes files related to plugins 4 9 pushd .. 5 10 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 6 16 popd > /dev/null 7 17 18 echo "-------------------------------------------------------------------------" 19 echo "\"Can't open [plugin-specific xml-file]\" error messages are expected below" 20 echo "-------------------------------------------------------------------------" 8 21 pushd ../mythtv/themes 9 22 $TS ../.. . > /dev/null 10 23 popd > /dev/null 11 24 25 echo "-------------------------------------------------------------------------" 26 echo "...until this point" 27 echo "-------------------------------------------------------------------------" 28 12 29 pushd .. 13 30 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 14 36 popd > /dev/null 15 37 16 # exclude mythweather us_nws strings17 chmod a-r ../mythplugins/mythweather/mythweather/scripts/us_nws/maps.xml18 38 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] 40 function 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 21 54 $TS . `pwd`/i18n > /dev/null 55 56 rm -rf temp_themestrings 57 22 58 popd > /dev/null 23 done 59 } 24 60 61 # exclude mythweather us_nws strings 62 chmod a-r ../mythplugins/mythweather/mythweather/scripts/us_nws/maps.xml 63 64 updateplugin mytharchive mytharchive-ui.xml mythburn-ui.xml 65 updateplugin mythbrowser browser-ui.xml 66 updateplugin mythgallery gallery-ui.xml 67 updateplugin mythgame game-ui.xml 68 updateplugin mythmovies movies-ui.xml 69 updateplugin mythmusic music-ui.xml 70 updateplugin mythnetvision netvision-ui.xml 71 updateplugin mythnews news-ui.xml 72 updateplugin mythvideo dvd-ui.xml video-ui.xml 73 updateplugin mythweather weather-ui.xml 74 updateplugin mythzoneminder zoneminder-ui.xml #zoneminder-ui.xml doesn't exist at the moment, but it's included for future use 75 25 76 chmod a+r ../mythplugins/mythweather/mythweather/scripts/us_nws/maps.xml 26 77 27 78 pushd .. > /dev/null