#!/bin/bash

# Install file for GnuPlot+ version 0.2.0
# Dominic Ford
# 30/03/2006

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

echo -e "#!/bin/bash\npython `pwd`/bin/py/gnuplot+.py \$*" > bin/gnuplot+
chmod 755 bin/gnuplot+
rm -f bin/gnuplot
ln -s `pwd`/bin/gnuplot+ bin/gnuplot

echo "Installation successful"
echo "Gnuplot replacement binary placed in directory 'bin'."
