#!/bin/bash
#
# Download and install the txt2pho binary
#
BINDIR='/usr/bin'
BINARY='txt2pho'
BINARYGZ="$BINARY.gz"
BINARYURL="http://www.euroconnection.ch/$BINARYGZ"

if ! test "$EUID" == '0' ; then
	echo 'ERROR: txt2pho-install-binary must be run as root'
	echo "       It will install $BINARY to $BINDIR/$BINARY"
	exit 1
fi

(cd $BINDIR && curl -O $BINARYURL && gzip -d $BINDIR/$BINARYGZ && chmod +x $BINDIR/$BINARY)
