yeah yeah it’s mad lame.. but it’s still quicker than copy and pasting to diff the files….

i’ll update this again sometime with a better version

#!/bin/bash  
# script to $DIFF_CMD the new configs dir with what /etc/asterisk currently has

#  
# Set the asterisk config directory  
# It's important to leave out the trailing slash  
#  
AST_CFGDIR="/opt/svn/feb0206/asterisk/configs"  
AST_RUNDIR="/etc/asterisk/samples"

# your diff command location  
DIFF_CMD='/usr/bin/diff –brief'

#  
# These config files reside in the database, but we still keep  
# a local copy nearby as a .conf.sample so we know what's changed  
# regardless of upgrades and $DIFF_CMDing files  
#  
$DIFF_CMD $AST_CFGDIR/iax.conf.sample $AST_RUNDIR/iax.conf.sample  
$DIFF_CMD $AST_CFGDIR/sip.conf.sample $AST_RUNDIR/sip.conf.sample  
$DIFF_CMD $AST_CFGDIR/voicemail.conf.sample $AST_RUNDIR/voicemail.conf.sample  
$DIFF_CMD $AST_CFGDIR/queues.conf.sample $AST_RUNDIR/queues.conf.sample

# this one isn't from db, but it's vastly different so we keep seperate copies  
$DIFF_CMD $AST_CFGDIR/extensions.conf.sample $AST_RUNDIR/extensions.conf.sample

# after diffing these files we want to copy the new ones over to replace the sample files  
# these are the files to copy  
#cp $AST_CFGDIR/extensions.conf.sample $AST_RUNDIR/  
#cp $AST_CFGDIR/iax.conf.sample $AST_RUNDIR/  
#cp $AST_CFGDIR/queues.conf.sample $AST_RUNDIR/  
#cp $AST_CFGDIR/sip.conf.sample $AST_RUNDIR/  
#cp $AST_CFGDIR/voicemail.conf.sample $AST_RUNDIR/

#  
# These files run from the config directory so should never change  
#  
$DIFF_CMD $AST_CFGDIR/adsi.conf.sample $AST_RUNDIR/adsi.conf.sample  
$DIFF_CMD $AST_CFGDIR/cdr_odbc.conf.sample $AST_RUNDIR/cdr_odbc.conf.sample  
$DIFF_CMD $AST_CFGDIR/meetme.conf.sample $AST_RUNDIR/meetme.conf.sample  
$DIFF_CMD $AST_CFGDIR/phone.conf.sample $AST_RUNDIR/phone.conf.sample  
$DIFF_CMD $AST_CFGDIR/telcordia-1.adsi $AST_RUNDIR/telcordia-1.adsi  
$DIFF_CMD $AST_CFGDIR/adtranvofr.conf.sample $AST_RUNDIR/adtranvofr.conf.sample  
$DIFF_CMD $AST_CFGDIR/cdr_pgsql.conf.sample $AST_RUNDIR/cdr_pgsql.conf.sample  
$DIFF_CMD $AST_CFGDIR/features.conf.sample $AST_RUNDIR/features.conf.sample  
$DIFF_CMD $AST_CFGDIR/mgcp.conf.sample $AST_RUNDIR/mgcp.conf.sample  
$DIFF_CMD $AST_CFGDIR/privacy.conf.sample $AST_RUNDIR/privacy.conf.sample  
$DIFF_CMD $AST_CFGDIR/udptl.conf.sample $AST_RUNDIR/udptl.conf.sample  
$DIFF_CMD $AST_CFGDIR/agents.conf.sample $AST_RUNDIR/agents.conf.sample  
$DIFF_CMD $AST_CFGDIR/cdr_tds.conf.sample $AST_RUNDIR/cdr_tds.conf.sample  
$DIFF_CMD $AST_CFGDIR/festival.conf.sample $AST_RUNDIR/festival.conf.sample  
$DIFF_CMD $AST_CFGDIR/misdn.conf.sample $AST_RUNDIR/misdn.conf.sample  
$DIFF_CMD $AST_CFGDIR/alarmreceiver.conf.sample $AST_RUNDIR/alarmreceiver.conf.sample  
$DIFF_CMD $AST_CFGDIR/codecs.conf.sample $AST_RUNDIR/codecs.conf.sample  
$DIFF_CMD $AST_CFGDIR/func_odbc.conf.sample $AST_RUNDIR/func_odbc.conf.sample  
$DIFF_CMD $AST_CFGDIR/modem.conf.sample $AST_RUNDIR/modem.conf.sample  
$DIFF_CMD $AST_CFGDIR/res_odbc.conf.sample $AST_RUNDIR/res_odbc.conf.sample  
$DIFF_CMD $AST_CFGDIR/vpb.conf.sample $AST_RUNDIR/vpb.conf.sample  
$DIFF_CMD $AST_CFGDIR/alsa.conf.sample $AST_RUNDIR/alsa.conf.sample  
$DIFF_CMD $AST_CFGDIR/dnsmgr.conf.sample $AST_RUNDIR/dnsmgr.conf.sample  
$DIFF_CMD $AST_CFGDIR/modules.conf.sample $AST_RUNDIR/modules.conf.sample  
$DIFF_CMD $AST_CFGDIR/rpt.conf.sample $AST_RUNDIR/rpt.conf.sample  
$DIFF_CMD $AST_CFGDIR/zapata.conf.sample $AST_RUNDIR/zapata.conf.sample  
$DIFF_CMD $AST_CFGDIR/asterisk.adsi $AST_RUNDIR/asterisk.adsi  
$DIFF_CMD $AST_CFGDIR/dundi.conf.sample $AST_RUNDIR/dundi.conf.sample  
$DIFF_CMD $AST_CFGDIR/iaxprov.conf.sample $AST_RUNDIR/iaxprov.conf.sample  
$DIFF_CMD $AST_CFGDIR/musiconhold.conf.sample $AST_RUNDIR/musiconhold.conf.sample  
$DIFF_CMD $AST_CFGDIR/rtp.conf.sample $AST_RUNDIR/rtp.conf.sample  
$DIFF_CMD $AST_CFGDIR/cdr.conf.sample $AST_RUNDIR/cdr.conf.sample  
$DIFF_CMD $AST_CFGDIR/enum.conf.sample $AST_RUNDIR/enum.conf.sample  
$DIFF_CMD $AST_CFGDIR/indications.conf.sample $AST_RUNDIR/indications.conf.sample  
$DIFF_CMD $AST_CFGDIR/muted.conf.sample $AST_RUNDIR/muted.conf.sample  
$DIFF_CMD $AST_CFGDIR/cdr_custom.conf.sample $AST_RUNDIR/cdr_custom.conf.sample  
$DIFF_CMD $AST_CFGDIR/extconfig.conf.sample $AST_RUNDIR/extconfig.conf.sample  
$DIFF_CMD $AST_CFGDIR/logger.conf.sample $AST_RUNDIR/logger.conf.sample  
$DIFF_CMD $AST_CFGDIR/osp.conf.sample $AST_RUNDIR/osp.conf.sample  
$DIFF_CMD $AST_CFGDIR/sip_notify.conf.sample $AST_RUNDIR/sip_notify.conf.sample  
$DIFF_CMD $AST_CFGDIR/cdr_manager.conf.sample $AST_RUNDIR/cdr_manager.conf.sample  
$DIFF_CMD $AST_CFGDIR/extensions.ael.sample $AST_RUNDIR/extensions.ael.sample  
$DIFF_CMD $AST_CFGDIR/manager.conf.sample $AST_RUNDIR/manager.conf.sample  
$DIFF_CMD $AST_CFGDIR/oss.conf.sample $AST_RUNDIR/oss.conf.sample  
$DIFF_CMD $AST_CFGDIR/skinny.conf.sample $AST_RUNDIR/skinny.conf.sample