#!/bin/bash

NAME=${bash[0]}
PROGRAM=${bash[3]}
FILE=${bash[2]}
EXT=${bash[4]}
DLINK=${bash[1]}
MD5=${bash[5]}

download ${DLINK}

waitUser

check ${FILE} ${MD5}

waitUser

unpack ${EXT}

waitUser

startBuild

cd $BUILD_DIR/$PROGRAM
{
	echo "$G $PROGRAM/configure --prefix=/tools --without-bash-malloc  $DEF" 
	./configure --prefix=/tools --without-bash-malloc || exit 1
	StartMake
	waitUser
	make || exit 1
	waitUser
	c_MakeTest tests || exit 1
	StartMakeInstall
	waitUser
	make install || exit 1
	waitUser
	ln -vs bash /tools/bin/sh
} 2>&1 | tee $BUILD_DIR/LOG_$PROGRAM.log
if [ $PIPESTATUS -ne 0 ]
	then
		echo -e "$L_FAIL_BUIL"
		exit 1
fi  	  

waitUser

RMsource

cd $ROOT
