[mythtv-users] Request for scripts

R. G. Newbury newbury at mandamus.org
Fri Oct 27 19:04:18 UTC 2006


  Joel Turner wrote:
 > Hi. I saw your post on the Myth user list and was wondering if you 
could forward me your scripts for automatic download and compile of 
Mythtv SVN.
 >
 > Thanks.
 >
 > --Joel Turner
I tried to send this directly but aol returns the message. So posted here.




A number of steps
create folder structure: I use /backup/usb as the top of the structure
All myth downloads etc are under there.
Create config files for myth, mythplugins and myththemes in 
/usr/local/sbin, so they do not get lost or deleted
Download new svn to /backup/usb/ etc.
build (plus install)

I run 2 parallel machines: the desktop here and the myth box at home.
Therefore I also create duplicate structures and carry over the data 
using a usb key. I run mythfilldatabase at work and transfer the data.
I try not to make any assumptions about folders/files existing and code 
accordingly

**************************************
# /usr/local/sbin/config-ah
# for mythtv: runs from inside the /backup/usb/mythtv folder,
# calls configure
./configure --prefix=/usr/local/ --arch=c3-2 --enable-proc-opt 
--enable-audio-alsa --disable-audio-arts --disable-audio-jack 
--disable-directfb  --enable-lirc --enable-v4l --enable-ivtv 
--disable-firewire --enable-dvb --dvb-path=/usr/include --enable-xvmc 
--enable-xvmc-vld --enable-xvmc-pro  --enable-opengl-vsync 
--enable-xvmc-opengl
# configt-sh and configp-s, for themes and plugins are similar
# the important bit is that --prefix=/usr/local or whatever be the same 
in each.
# NOTE: the non-SVN versions install to /usr not /usr/local
# You can choose where you want to put the binaries and libs but
# they are easier to find if in /usr/local/bin or /usr/local/lib



*************************************
# /usr/local/sbin/call-svn
cd /backup
mkdir /backup/usb
# in case it had been removed
cd /backup/usb
# fails ungracefully if did not exist
# remove old versions
rm -rf mythtv
rm -rf mythplugins
rm -rf myththemes
# fails gracefully if these do not exist
svn co http://svn.mythtv.org/svn/trunk/mythtv
svn co http://svn.mythtv.org/svn/trunk/myththemes
svn co http://svn.mythtv.org/svn/trunk/mythplugins
# build structure under /backup/usb
*************************************************



******************************************
#/usr/local/sbin/all-build
# Note make install is separated so that it can be commented out
# and installation can be done at a different time.
#  Useful for commencing a compile while the old version of myth
# is running/recording: Start a compile, go to bed, install in the
# morning when the late-night movie has been recorded!
cd /backup/usb
rm -f /backup/usb/log.out
echo "Commence build" > /backup/usb/log.out
date >> /backup/usb/log.out
# So I can see how long it actually took
# Note existence of make clean if re-running
# Remove old config scripts
rm -f /backup/usb/myththemes/configt-sh
rm -f /backup/usb/mythplugins/configp-sh
rm -f /backup/usb/mythtv/config-sh
# Copy new versions into place
cp /usr/local/sbin/configt-sh /backup/usb/myththemes
cp /usr/local/sbin/configp-sh /backup/usb/mythplugins
cp /usr/local/sbin/config-sh /backup/usb/mythtv
echo "End cleanup and copy of configuration" >> /backup/usb/log.out
date >> /backup/usb/log.out
# Make can be done in any order
# Make install of mythtv must precede the others
cd /backup/usb/mythtv
#make clean
./config-sh
qmake mythtv.pro
make
#make install
echo "End mythtv make" >> /backup/usb/log.out
date >> /backup/usb/log.out

echo "Commence myththeme build"
cd /backup/usb/myththemes
#make clean
./configt-sh
qmake mythplugins.pro
make
#make install
echo "End myththemes" >> /backup/usb/log.out
date >> /backup/usb/log.out
echo "Commence mythplugin build" >> /backup/usb/log.out
cd /backup/usb/mythplugins
#make clean
./configp-sh
qmake myththemes.pro
make
#make install
echo "End mythplugins" >> /backup/usb/log.out
date >> /backup/usb/log.out
cd /backup/usb
cat log.out

************************************************

This is my downloader for updating with mythfilldatabsae

*******************

#!/bin/bash
# /usr/local/sbin/wrap-zapper
# calls zap2it, downloads EPG data, dumps it to text file
# mounts usb key and copies to it
mythfilldatabase --refresh-all
# uses refresh-all since I don't do this every day
mkdir /backup/usb
mkdir /backup/usb/db
# fails gracefully if not needed
rm -fv /backup/usb/db/mysqlzap.txt
# remoive old data file: fails gracefully
# included from standalone file mysqlzap-up
mysqldump -u mythtv -pmythtv mythconverg --tables credits oldprogram 
people program programgenres programrating > /backup/usb/db/mysqlzap.txt

mount -t vfat /dev/sda1 /mnt/key
mkdir /mnt/key/usb
mkdir /mnt/key/usb/db
# fails gracefully if exists, and ungracefully later it not
rm -f /mnt/key/usb/db/mysqlzap.txt
cp -a /backup/usb/db/mysqlzap.txt /mnt/key/usb/db
umount /mnt/key
echo "FINISHED"

              R. Geoffrey Newbury			

        Helping with the HTTP issue
<a href="http://www.w3.org/Protocols/">HTTP</a>


More information about the mythtv-users mailing list