#!/usr/bin/perl

$HOME = $ENV{HOME};
$fail = system("mv -i easylatex $HOME/.easylatex");
if ($fail) {die "Aborting; reason: couldn't do 'mv easylatex $HOME/.easylatex'; maybe easylatex is already installed?";}

# I'll assume most distos have psfrag and leave this out for now...

# should put in a test here to make sure psfrag, amsmath, etc are installed
 
#$fail = system('cd psfrag; latex psfrag.ins');
#if ($fail) {die "Couldn't install psfrag; graph functionality not installed. The rest of EasyLatex is installed.";}


# print <<"EOF";




# ----------------------------

# Most of EasyLatex is now installed.

# If you are going to let EasyLatex generate PostScript files for you,
# then you are almost done. To tell EasyLatex to generate a PostScript file,
# use the "-ps" flag like this: 

#    easylatex.pl -ps demo.txt

# However, if you'll want to manually recompile .tex files with graphs in them,
# you'll need to install "psfrag" yourself. Psfrag is a separate program
# which is bundled with this one. It is in the subdirectory "psfrag".



# EOF