#!/bin/sh
# $Id: 7.customuser.sh,v 1.11 2004/05/23 12:06:51 rionda Exp $

set -e -u

. ./config.sh

echo "Installing customized files..."
cp $LOCALDIR/COPYING $FREESBIEBASEDIR/COPYRIGHT.FreeSBIE
[ -e $LOCALDIR/files/foobar/irssi_config ] && mkdir $FREESBIEBASEDIR/root/.irssi && cp -v $LOCALDIR/files/foobar/irssi_config $FREESBIEBASEDIR/root/.irssi/config
[ -e $LOCALDIR/files/foobar/mutt.tar.bz2 ] && tar jxvf $LOCALDIR/files/foobar/mutt.tar.bz2 -C $FREESBIEBASEDIR/root/
cp -v $LOCALDIR/files/foobar/.* $FREESBIEBASEDIR/root/
cp -Rv $LOCALDIR/files/foobar/* $FREESBIEBASEDIR/root/
find $FREESBIEBASEDIR/root/ -type d -name CVS -exec rm -rf {} \;
rm -f $FREESBIEBASEDIR/root/irssi_config $FREESBIEBASEDIR/root/mutt.tar.bz2

pw usermod root -V $FREESBIEBASEDIR/etc -s /bin/tcsh

if [ -f $FREESBIEBASEDIR/usr/X11R6/bin/XFree86 ]; then
	echo "X installed, creating /etc/X11/..."
	mkdir -p $FREESBIEBASEDIR/etc/X11/
	rm $FREESBIEBASEDIR/usr/X11R6/bin/X 
	ln -sf $FREESBIEBASEDIR/usr/X11R6/bin/XFree86 $FREESBIEBASEDIR/usr/X11R6/bin/X
fi;
