12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- use std
- use "cp"
- use "dispatch"
- use "dateutil"
- use "mkdir"
- use "ls"
- use "echo"
- use "cat"
- use "rm"
- use "httpd"
- use "sha256sum"
- use "sleeputil"
- use "uname"
- use "whoami"
- const main = {args : byte[:][:]
- const program = "milisbox"
- var cmd
- var params
- cmd = args[0]
-
- //if std.eq(args[0], "somestring")
-
- cmd = std.basename(cmd)
- std.put("progname: {}\n", cmd)
- match cmd
- | program :
- std.put("{} {}\n",program," 0.1 info")
- cmd = args[1]
- params = args[2:]
- | _:
- std.put("{} {} {}\n",program,cmd,"0.1 info")
- params = args[1:]
-
- ;;
- std.put("call {} with these: {}\n",cmd,params)
-
- if !dispatch.call(cmd,params)
- std.put("unknown command: {}\n", cmd)
- ;;
- }
|