#!/bin/bash

# exit this script if any error occurs
set -e

# get the directory where this script is in
SCRIPTDIR="$(realpath -s $(dirname $0))"

# check if asciiquarium is unique
if [ $(type -a asciiquarium | wc -l) -ne 1 ]; then
  echo "ERROR: asciiquarium is not unique!"
  exit 1
fi

# check if it is the container version
if [ "$(head -n 1 $(type -p asciiquarium))" = "#!/usr/bin/env run-singularity" ]; then
  echo "Congratulations! Task solved correctly."
else
  echo "ERROR: asciiquarium is not the wanted one!"
  exit 1
fi

# exit the script with zero exit code
exit 0
