BASH script for LOVE2D + Gedit External Tools Plugin

Due to a severe lack of good IDEs for Lua, I have resorted to using gedit. The External Tools plug-in greatly extends the functionality of gedit by giving the user the ability to run scripts from the press a keyboard shortcut. Go to Tools > External Tools and add a new shortcut. Make sure to set the hotkey of your choice and then enter this script into the edit box on the top right:

if [ -f $GEDIT_CURRENT_DOCUMENT_DIR/main.lua ]
echo "Error! main.lua not found!"