I wanted to make a .sh launcher for main.lua on Linux Mint. I worked out the script, then learned that print functions can be seen in the terminal window. I figured that this would be useful to share, since I had happened to catch on to it myself.
The bash script is below. It will open love, pointing it to the path of the .sh file. This means it must be with "main.lua". Just create a launcher that launches this script with the terminal window enabled. This script can have any name.
Code: Select all
#!/bin/bash
love "$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
sleep 3
This gets me thinking that there would be a command to get lua files to open with love directly by opening them with a custom command. I don't know enough about bash scripting to figure out how this would be done, if it is possible.
EDIT: script corrections.