No CVS! Ya Big Weenie :-)



What!  You don't want to use CVS!?  You big wimp! :-)  Hehehe...  Hey, I 
don't blame you; it can be a real headache at times.  I am a newbie to 
using many of these unix tools (cvs being one) too.  Here are some scripts 
that I and some guy named Dan (forgot his last name) have been working on 
to automate both the update from CVS and the subsequent compilation that 
you will have to do.  If I ever get this damn thing to work the way I 
want to, I will be able to do unattended (read: while I sleep) updates 
and compiles from CVS every frew days and have fresh GNOME when I wake up 
the next morning.  That's the Grand Vision (tm) anyway.  For god's sake, 
though, if you do use these scripts, change the email address; I don't 
want to hear about YOUR compiles every day (I have enough trouble with my 
OWN:-)

shane

#!/bin/sh
#
# File:      gnome-update
#
# Purpose:   Automate compilation of gnome so that it can be run
#            in a cronjob unattended
#
# Created:   Shane Lenagh, 11.22.98
#
# Modified:  Dan from Brown U. , 11.23.98
#                      Made much more thorough. 
#

# where we are keeping our gnome sources
src_dir=/usr/local/gnome/src              
# file to write update log to
log=$src_dir/update_log
# file where we store update success message
update_success=$src_dir/update_success
# CVS server
CVSROOT=":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome"

# The modules to update
modules="glib gtk+ imlib gtk-engines libIDL ORBit gnome-libs libvfs 
gnome-objc \
        libgtop gnome-core gnome-guile gnome-admin gnome-games 
gnome-network \
	gnome-utils balsa"

# can't rest on our laurels
if [ -e $update_success ]; then
    rm $update_success;
fi

cd $src_dir

echo "Updating GNOME from CVS server $CVSROOT at `date`" > $log 2>&1
echo "" >> $log 2>&1

for module in $modules
do
	if [ -d $module ]
	then
	  rm -rf $module
# alternatively:
# cvs -z3 -d $CVSROOT update -d -P $i >> $log 2>&1 || exit 1
# else
# cvs -z3 ...
# fi
	fi
	cvs -z3 -d $CVSROOT checkout $module >> $log 2>&1 || exit 1
done

echo "Update of GNOME from CVS server $CVSROOT succeeded at `date`" > 
$update_success

#!/bin/sh
#
# File:      gnome-compile
#
# Purpose:   Automate compilation of gnome so that it can be run
#            in a cronjob unattended
#
# Created:   Shane Lenagh, 11.22.98
#
# Modified:  Dan from Brown U. , 11.23.98
#                      Made much smaller and more thorough. 
#

# where we are keeping our gnome sources
src_dir=/usr/local/gnome/src               
# file to write detailed compilation log to
log=$src_dir/compile_log
# file to write brief compilation summary to
compile_summary=$src_dir/compile_summary
# autogen prefix directory (both gnome and gtk)
prefix=/usr/local/gnome
# where to send compilation results to
email_alert_addresses="sml13@cornell.edu"
# file where update script stores update success message
update_success=$src_dir/update_success
# file where this script will store compile success message
compilation_success=$src_dir/compile_success

# set those aclocal flags
export ACLOCAL_FLAGS="-I $prefix/share/aclocal/"

# Set the path..
PATH=$PATH:$prefix/bin

# Command to do installation (null if not needed..)
get_privs=root

# assume the worst, hope for the best ;-)
compilation="failure"  

# The modules to compile (special handlers for glib and gtk later..)
modules="glib gtk+ imlib gtk-engines libIDL ORBit gnome-libs libvfs 
gnome-objc \
        libgtop gnome-core gnome-guile gnome-admin gnome-games 
gnome-network \
	gnome-utils balsa"

#
# Email me with results of compilation/failure
# before we exit
#
trap ' 
    if [ $compilation = "failure" ]; then
	echo "" | tee -a $compile_summary >> $log
	echo "Failed to compile GNOME at `date`" | tee -a 
$compile_summary >> $log
	cat $compile_summary $log | mail -s "Failed to compile GNOME at 
`date`" $email_alert_addresses
    else
	cat $compilation_success | mail -s "Succeeded in compiling GNOME 
at `date`" $email_alert_addresses
    fi
' EXIT

# let's not rest on our laurels
if [ -e $compilation_success ]; then 
    rm $compilation_success; 
fi

# wipe out previous log and summary too
echo "" | tee $compile_summary > $log           

echo "Preparing to compile modules: $modules" tee -a $compile_summary >> $log

#
# We only need to compile if we have recently (successfully) updated
# from CVS
#
if [ -e $update_success ]; then
    echo "" | tee -a $compile_summary >> $log
    echo 
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" | tee -a $compile_summary >> $log
    echo "+++++++ Compiling GNOME at `date`" | tee -a $compile_summary >> 
$log
    echo 
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" | tee -a $compile_summary >> $log
    echo "" | tee -a $compile_summary >> $log
else
    echo "Update failed...get new stuff from CVS and then recompile" | 
tee -a $compile_summary >> $log
    exit 1;
fi

# Nuke old macro files

$get_privs rm -rf $prefix/share/aclocal/*

#
# Compile stuff
#

for module in $modules
do
# gtk+ and glib don't need the --with-* prefixes.
	if [ $module = glib ] || [ $module = gtk+ ]
	then
		with_stuff=""
	else
		with_stuff="--with-gtk-prefix=$prefix --with-glib-prefix=$prefix"
	fi
	echo "" | tee -a $compile_summary >> $log &&
	echo 
"************************************************************************" | tee -a $compile_summary >> $log &&
	echo "******* Compiling $module at `date`" | tee -a 
$compile_summary >> $log &&
	echo 
"************************************************************************" | tee -a $compile_summary >> $log &&
	echo "" | tee -a $compile_summary >> $log &&
	cd $src_dir/$module &&
	./autogen.sh --prefix=$prefix $with_stuff >> $log 2>&1 &&
#	make maintainer-clean >> $log 2>&1 &&
	make >> $log 2>&1 &&
	$get_privs make install >> $log 2>&1 &&
	$get_privs ldconfig >> $log 2>&1 || exit 1
done

# we made it!
echo "" tee -a $compile_summary >> $log
compilation="success"
echo "Congratulations!  Compilation of GNOME  succeeded at `date`" | tee 
-a $log > $compilation_success



On Tue, 24 Nov 1998, Nghia Ho wrote:

> 
> >On 24 Nov, Nghia Ho scribbled:
> >->  The new gtk-themes is design for gtk-1.1.3 but all my gnome rpms 
> are for 
> >->  gtk-1.1.2.  I don't want to have to recompile everything.  Its a 
> >->  nightmare.  Is there a way to hack gtkthemes to work with gtk-1.1.2
> >
> >yup - rebuild all your apps. :) hey - we do it every day or 2... :)
> 
> Damn.  For some reason I think the stable release of gnome only works 
> with gtk-1.1.2.  Is this true?  The CVS is a nightmare and I don't want 
> to have to use it.  
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> 
> 
> -- 
>         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.
> 
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]