summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.lua b/main.lua
new file mode 100644
index 0000000..291f490
--- /dev/null
+++ b/main.lua
@@ -0,0 +1,10 @@
+function love.load(args)
+ local cmd = "viewer"
+ if not love.filesystem.isFused() and args[1] == '-r' then
+ cmd = args[2]
+ end
+ local path = "cmd/"..cmd..".lua"
+ local fn = assert(
+ loadstring(assert(love.filesystem.read(path)), "@"..path))
+ return fn(unpack(args, 3))
+end