#!/usr/bin/env bash
#
# A 'Nothing' compiler - RoPe Inc 2010.
#

if [[ $# -eq 0 ]]
then
    echo "Usage: ./nothing <filename.not>"
    exit
fi

if [[ ! -f $1 ]]
then
    echo "File not found!"
    exit
fi

Code=`cat $1`

if [[ -n $Code ]]
then
    echo "Not a valid Nothing source!"
    exit
fi

touch ${1%%.*}
chmod +x ${1%%.*}

echo "Compilation successfull!"
