#!/bin/sh
# Written by Don Yacktman for use with the MiscKit
# Copyright (C) 1994, by Don Yacktman, all rights reserved.

# If needed, install tool.make in /NextDeveloper/Makefiles/app,
# if we can...

if [ -f $2 ] ; then
	echo 'Found tool.make...OK'
else
	echo 'Could not find tool.make...installing'
	cp Makefiles/tool.make $2
	chmod 644 $2 
	if [ -f $2 ] ; then
	    echo 'Installed OK.'
	else
	    echo 'Installation failed...run as root to install tool.make.'
	    exit 1
	fi
fi

# If needed, build and install arch_tool...if we can...

if [ -f $1 ] ; then
	echo 'Found arch_tool...OK'
else
	(cd Examples/arch_tool; make install; )
	if [ -f $1 ] ; then
	    echo 'arch_tool built and installed...OK'
	else
	    echo 'Unable to build and install arch_tool properly.  Run as root.'
	fi
fi

exit 0;

