#!/bin/sh

# A simple wrapper for ln, which first checks
# if the link already exists, and issues
# a warning instead than an error. This is
# useful for Makefiles, where an error normally
# causes the make to stop.

LN="/usr/bin/ln -s"

if [ $# != 2 ]
then
  echo "Usage: $0 file link_name"
  exit 1
fi

if [ ! -f $2 ]
then
  $LN $1 $2
else
  echo "Warning: file $2 already exists"
fi

exit 0
