#!/bin/sh

set -e

# Check that this is an Atari before installation, on other machines
# setSCCserial is useless
if [ ! -f /proc/version ]; then
	echo "No /proc filesystem -- can't check for Atari"
else
	# the grep also fails if there's no /proc/hardware at all, which is the
	# case on non-m68k machines and m68k's that are not Amiga or Atari
	if ! grep '^Model:[ 	]*Atari' /proc/hardware >/dev/null 2>&1; then
		echo "The setSCCserial tool is meant for Atari machines only -- not installing"
		exit 1
	fi
fi

exit 0
