#!/bin/bash

DEPS="Eterm awk basename cat clear colortail cut expr getopt head kill ps rev sh sleep su tac tail touch uname wc which whoami xdpyinfo xlsfonts xwininfo"

if [ -e scripts/deps ]; then
	rm -f scripts/deps
fi

for i in $DEPS; do
	CPATH=`which $i 2>/dev/null`
	echo -n "checking for $i... "
		if [ -x "$CPATH" ]; then
			echo "$CPATH"
			echo "$CPATH" >> scripts/deps
		else
			echo "WARNING! $i not found"
			err="1"
		fi
done

if [ "$err" = "1" ]; then
    echo -e "\nUnsatisfied dependencies, paralogger may not function correctly."
    echo "Paralogger will function without \"colortail\" or \"tac\" installed."
else
    echo -e "\nNow type \"make install\" to install."
fi
