#!/bin/bash
# This script creates a $HOME/.fvwm/cvs directory
# and then logs onto cvs.fvwm.org and installs
# the fvwm source code....
# and then....
# goes off to sourceforge.net and does the same
# for fvwm-themes.
# To upgrade the sources after running this script
# to create them, use the upgrade-cvs-fvwm-themes
# script. Any comments, suggestions etc, to
# Alex Wallis -- email: awol@otaku42.de

echo
echo "WARNING! This script will install the entire"
echo "sources for the latest development version of"
echo "both fvwm AND fvwm-themes!"
echo "You MUST be online or this script will fail."
echo
echo

[ -d $HOME/.fvwm ] || echo "Creating $FVWM_USERDIR" ; mkdir $HOME/.fvwm
[ -d $HOME/.fvwm/cvs ] || echo "Creating "$HOME"/.fvwm/cvs" ; mkdir $HOME/.fvwm/cvs

echo "Changing directories..."

cd $HOME/.fvwm/cvs

echo
echo "Now we logon to cvs.fvwm.org"
echo "The password is --> guest"
echo

cvs -d :pserver:anonymous@cvs.fvwm.org:/home/cvs/fvwm login

echo "Now downloading fvwm source files...."
cvs -d :pserver:anonymous@cvs.fvwm.org:/home/cvs/fvwm checkout fvwm

echo "Now we prepare the sources...."
cd fvwm
autoreconf
automake --add-missing
echo
echo "Good! Fvwm sources installed."
echo
echo "Lets go grab fvwm-themes now."
echo "Logging onto sourceforge.net"
echo "Just press Return when asked for password."
echo
cd ..

 cvs -d:pserver:anonymous@fvwm-themes.cvs.sourceforge.net:/cvsroot/fvwm-themes login
echo
echo "Downloading sourcefiles...."
 cvs -z3 -d:pserver:anonymous@fvwm-themes.cvs.sourceforge.net:/cvsroot/fvwm-themes co -P fvwm-themes

 

echo "Preparing the fvwm-themes sources..."
cd fvwm-themes
autoreconf
automake --add-missing

echo
echo "Now we just go ahead and run the upgrade-cvs-fvwm-themes script."
echo

$HOME/bin/upgrade-cvs-fvwm-themes.sh

echo "Installation complete!"
echo
echo "Just run upgrade-cvs-fvwm-themes.sh whenever you want to bring"
echo "your fvwm & fvwm-themes sources up to date!"
echo

#chmod 644 $HOME/bin/install-cvs-fvwm-themes

