#!/bin/sh

welcome()
{
    sleep 2 && exec rox-welcome.sh &
}

vinedir="$HOME/.config/rox.sourceforge.net/vine"

if [ ! -d $vinedir ]; then
    mkdir -p $vinedir
    rpm -q rox-filer >  $vinedir/version
    echo "Don't remove this directory and files" > $vinedir/notice
    welcome
    exit 0
fi

read ROXVER < $vinedir/version
if [ "$#" == "1" ] && [ "$1" == "-c" ]; then
    if [ ! x"`rpm -q rox-filer`" == x"$ROXVER" ]; then
	rpm -q rox-filer >  $vinedir/version
	welcome
    fi
else
    welcome
fi

exit 0
