This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot-2/launch.sh

26 lines
764 B
Bash
Raw Normal View History

2016-09-07 02:34:57 +02:00
# Run otouto in Lua 5.3, if available.
# (Specifying lua5.3 because "lua" is not linked to it in Ubuntu 16.04.)
# Otherwise, use any generic installed Lua.
# If none, give an error and a friendly suggestion.
# If Lua was found, restart otouto five seconds after halting each time.
2016-09-04 09:42:51 +02:00
#!/bin/sh
# Ubuntu 16.04 seems to not link "lua" to lua5.3.
if type lua5.3 >/dev/null 2>/dev/null; then
while true; do
lua5.3 main.lua
2016-09-04 09:42:51 +02:00
echo "otouto has stopped. ^C to exit."
sleep 5s
done
2016-09-07 02:34:57 +02:00
elif type lua >/dev/null 2>/dev/null; then
while true; do
lua main.lua
echo "otouto has stopped. ^C to exit."
sleep 5s
done
else
2016-09-07 02:34:57 +02:00
echo "Lua not found."
echo "If you're on Ubuntu, try running ./install-dependencies.sh."
fi