#!/bin/sh
set -e

. optvars

SYMLINK=$1
FILE=$2
if [ -h $SYMLINK ]
then
    if [ -e $FILE ]
    then
        if [ $FILE = `ls -l $SYMLINK | sed 's/.* -> //'` ]
	then
	    echo 1
	else
	    echo 0
	fi
    else
	echo 0
    fi
else
    echo 0
fi
