mirror of
https://github.com/0x5eal/terracotta.git
synced 2024-12-12 04:40:42 +00:00
21 lines
773 B
Bash
Executable file
21 lines
773 B
Bash
Executable file
#!/bin/bash
|
|
|
|
#########################################################################
|
|
# A handy bash script which emulates pre 0.8 lune execution behavior. #
|
|
# This script checks if there is a lua(u) script at discoverable #
|
|
# paths, and if so, executes them with `lune run`, allowing for #
|
|
# implicit script execution as before. #
|
|
# USAGE: ./lunew [ARGS] [PARAMETERS] #
|
|
#########################################################################
|
|
|
|
lune=$(which lune)
|
|
|
|
if (( $(lune --version | cut -d ' ' -f 2 | cut -d '.' -f 2) >= 8 )); then
|
|
if compgen -G "$1*" > /dev/null || compgen -G ".lune/$1*" > /dev/null; then
|
|
lune run "$@"
|
|
exit $?
|
|
fi
|
|
fi
|
|
|
|
lune "$@"
|
|
exit $?
|