#!/bin/bash

# Note : this script will probably work on other flavours of Linux using RPM.

# run as root! su or sudo.

who=$(whoami)

if [[ "$who" != root ]]
then
	echo "This script must be run as root."
	echo "Please try again: sudo cwb-install-fedora"
	echo "Thanks!"
	exit
fi

yum install autoconf bison flex gcc pkgconfig glibc glibc-common glibc-devel glibc-headers make ncurses ncurses-libs pcre pcre-devel glib glib-devel readline readline-devel

./install-scripts/cwb-config-basic

make clean
make depend
make cl
make utils
make cqp

make install

# restore original state of config file (so subversion doesn't get confused if this is a checked-out version)
rm config.mk
mv config.mk.bak config.mk
