#! /bin/bash
#
gcc -c -g -Wall -I/$HOME/include candy_count_test.c
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
gcc -o candy_count_test candy_count_test.o $HOME/libc/candy_count.o
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm candy_count_test.o
#
./candy_count_test > candy_count_test.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
rm candy_count_test
#
echo "Normal end of execution."
