#!/bin/bash

# Install file for GnuPlot+ version 0.3.0
# Dominic Ford
# 12/04/2006

mkdir -p bin/py
cp src/* bin/py
echo -e "#!`which python`" >  bin/py/gnuplot+.py
echo "PATH=\"`pwd`\""      >> bin/py/gnuplot+.py
cat src/gnuplot+.py        >> bin/py/gnuplot+.py

chmod 755 bin/py/gnuplot+.py
rm -f bin/gnuplot bin/gnuplot+
ln -s `pwd`/bin/py/gnuplot+.py bin/gnuplot
ln -s `pwd`/bin/py/gnuplot+.py bin/gnuplot+

echo "Installation successful"
echo "Gnuplot+ executable placed in directory 'bin'."
