#!/bin/bash
#
# $Id$
#
# Test mondo locally
#

(
dname=`dirname $0`
prem=`echo $dname |cut -c1`
if [ _${prem} = _"/" ]; then
        export TOOLHOME=$dname
else
        export TOOLHOME=${PWD}/$dname
fi

. $TOOLHOME/common-env
. $TOOLHOME/distro-env

h=test-mondo
#
# For the laptop
#
d=/home/bruno/demo-mondo

cat > $TMPDIR/test-mondo << EOF
#!/bin/bash

export LANG=C
export LANGUAGE=C
export LC_ALL=C
mkdir -p $d
mkdir -p $d/tmp-$h $d/scratch-$h $d/images
/usr/sbin/mondoarchive -g -O -i -G -F -N -O -E "/usr/share/doc /usr/share/games /usr/share/fonts /usr/share/icons /usr/share/locale /usr/share/texmf /usr/src /home /users /var/log" -d images -s 4300m -T $d/tmp-$h -S $d/scratch-$h -p $h-$m
EOF
chmod 755 $TMPDIR/test-mondo
export PATH=/sbin:/usr/sbin:$PATH ; sudo $TMPDIR/test-mondo

) 2>&1 | tee /tmp/backuplocal.log

