#!/bin/sh

if [ "$1" = "--help" ]; then
    echo "--about Shows Credits"
    exit 1
fi

if [ "$1" = "--about" ]; then
    echo "This Program was made by Fervi and Evilus"
    exit 1
fi

if ! [ "$1" = "" ]; then
if ! [ "$2" = "" ]; then
iat $1 $2
exit 1
else
echo "No arguments found!"
exit 1
fi
fi

prog1="zenity --file-selection"
prog2="zenity --save --filename=*.iso --file-selection"

if [ -e /usr/bin/iat ]; then
echo "Iat found in /usr/bin/iat [ OK ]"
iat `$prog1` `$prog2`
else
echo "Iat found in /usr/bin/iat [ NEGATIVE ]"
if [ -e $PWD/iat ]; then
echo "Iat found in $PWD/iat [ OK ]"
iat `$prog1` `$prog2`
else
echo "I can't find Iat, sorry :( [ ERROR ]"
fi
fi
