diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-15 11:22:56 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | dceb06938c1295d1a4a7eafff20d5007e48dab81 (patch) | |
| tree | 5984aa544f188d4033fda2b40c91e4a10005f4a8 /bin/alv | |
| parent | add array and struct constructors (diff) | |
| download | alive-dceb06938c1295d1a4a7eafff20d5007e48dab81.tar.gz alive-dceb06938c1295d1a4a7eafff20d5007e48dab81.zip | |
move copilot logic, make startup scripts lua
Diffstat (limited to 'bin/alv')
| -rwxr-xr-x | bin/alv | 40 |
1 files changed, 4 insertions, 36 deletions
@@ -1,36 +1,4 @@ -#!/usr/bin/env moon -import Copilot, Logger from require 'alv' -import sleep from require 'system' - -class ColorLogger extends Logger - set_time: (time) => - super time - @stream\write switch time - when 'eval' then '\27[92m' - when 'run' then '\27[0m' - -arguments, key = { nocolor: false } -for a in *arg - if key - arguments[key] = a - key = nil - else if match = a\match '^%-%-(.*)' - if 'bool' == type arguments[key] - arguments[key] = true - else - key = match - else - table.insert arguments, a -assert not key, "option value missing" - -if arguments.nocolor - Logger\init arguments.log -else - ColorLogger\init arguments.log - -assert arguments[1], "no filename given" -copilot = Copilot arguments[1] - -while true - copilot\tick! - sleep 1 / 1000 +#!/usr/bin/env lua +require('moonscript') +local Copilot = require('alv.copilot.cli').CLICopilot +Copilot(arg):run() |
