#! /bin/sh
#
# Start Vim on a copy of the tutor file.

# Use Vim to copy the tutor, it knows the value of $VIMRUNTIME

VIM=/bin/vi
[ -x /usr/bin/vim ] && VIM=/usr/bin/vim
[ ! -z "$DISPLAY" -a -x /usr/X11R6/bin/gvim ] && VIM=/usr/X11R6/bin/gvim

TUTORCOPY=/tmp/tutor$$
export TUTORCOPY
$VIM -u NONE -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! $TUTORCOPY' -c 'q'

# Start vim without any .vimrc, set 'nocompatible'
$VIM -u NONE -c "set nocp" $TUTORCOPY

# remove the copy of the tutor
rm $TUTORCOPY
