[Xastir] Compile Script

Chip G. n1mie at ct.metrocast.net
Thu Oct 5 16:12:59 EDT 2006


I would like to share a script I have been writing. It is not very  
intelligent, at least at this point. I am interested in feedback on  
making it smarter and more universal. Some of this I could do on my  
own given time, but some of it (especially with respect to other  
systems) will require the aid of others. The motivation was the  
number of commands written to go through the compile process (cvs  
update, ./bootstrap, etc). Some of those commands were lengthy and  
difficult to remember (especially the configure command with it's  
switches).

Some assumptions. It is assumed you are using CVS. It is assumed the  
script is executed from the folder where you normally perform your  
"cvs update". You should not run this script unedited because the  
configure options are specific to my needs/desires and yours will  
certainly be different.

I typically run this script with the tee command to save the output  
to a file. That way I can always go back and look at the last compile  
for relevant information. My command looks as follows:

	$ ./myupdate.sh | tee myupdate.out

Here is the script (bash v2.05). Be sure to save it as "myupdate.sh"  
and perform a chmod +x on it.

BEWARE OF LINE WRAP

-- begin script --

#!/bin/sh
#	written by: Chip-N1MIE, n1mie at arrl.net

#	store current directory so I can get back
STARTDIR=$(pwd)

#	this is done because I have had at least a few cases of loss of  
configuration
echo;echo $(date)
echo "--------------------         Backing Up Config          
--------------------";echo
#	change the following line for the path to your preference folder
cd ~/.xastir
zip -our backup.zip config data gps logs tmp tracklogs
cd $STARTDIR

echo;echo $(date)
echo "--------------------         Getting CVS Update         
--------------------";echo
#	you can add desired switches here or put them in your .cvsrc file
cvs update

echo;echo $(date)
echo "--------------------      Executing 'bootstrap.sh'      
--------------------";echo
./bootstrap.sh

echo;echo $(date)
echo "-------------------- Performing Configure With Options  
--------------------";echo
#	Edit the following line with configure options you desire
sudo ./configure --with-bdb-libdir=/sw/lib --with-bdb-incdir=/sw/ 
include/db4 --prefix=/sw --with-rtree --with-profiling

echo;echo $(date)
echo "--------------------      Cleaning Old Make Files       
--------------------";echo
sudo make clean

echo;echo $(date)
echo "--------------------        Compiling the Files         
--------------------";echo
sudo make -s

echo;echo $(date)
echo "--------------------       Installing the Files         
--------------------";echo
sudo make install -s

echo;echo "---------- Done ----------";echo


--  end script  --


73,
--de Chip (N1MIE) FN41bn




More information about the Xastir mailing list