if test ! -x "$l_prog"
then
echo "E100: missing $l_prog" ; exit 2
fi
case "$l_rmode" in
"LINK")
if test -L "$l_new_rcs"
then
echo "W110: found $l_new_rcs" ; return
fi
if test -x "$l_new_rcs"
then
echo "W111: found $l_new_rcs" ; return
fi
if test -L "$l_new_grcs"
then
echo "W110: found $l_new_grcs" ; return
fi
if test -x "$l_new_grcs"
then
echo "W111: found $l_new_grcs" ; return
fi
ln -s "$l_prog" "$l_new_rcs"
ln -s "$l_prog" "$l_new_grcs"
;;
"UNDO")
if test ! -L "$l_new_rcs"
then
echo "W120: missing $l_new_rcs" ; return
fi
if test ! -x "$l_new_rcs"
then
echo "W121: missing $l_new_rcs" ; return
fi
if test ! -L "$l_new_grcs"
then
echo "W120: missing $l_new_grcs" ; return
fi
if test ! -x "$l_new_grcs"
then
echo "W121: missing $l_new_grcs" ; return
fi
rm "$l_new_rcs"
rm "$l_new_grcs"
;;
*)
echo "E130: $l_rmode in valid" ; exit 2
;;
esac
} # END: f_link()
#
# main
#
g_dir="$HOME/bin" # should be first Dir in your path
g_rmode="LINK" # SET to either LINK or UNDO
if test "`uname -s`" != "OpenBSD"
then
echo "$OS NOT SUPORTED"
exit 2
fi
# all we need is to update ~/.xessions
# with PATH from ~/.profile and execute
# these commands and emacs will work