#!/bin/bash

# Install file for GnuPlot+ version 0.4.0
# Dominic Ford
# 27/04/2006

VERSION="0.4.0"
DATE="27/04/2006"

mkdir -p bin/py
cp src/* bin/py
echo -e "#!`which python`"       >  bin/py/__init__.py
echo -e "__import__('gnuplot+')" >> bin/py/__init__.py
echo -e "VERSION='${VERSION}'"   >  bin/py/gp_version.py
echo -e "DATE='${DATE}'"         >> bin/py/gp_version.py

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

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