diff options
author | dvs1 | 2024-10-25 13:40:21 +1000 |
---|---|---|
committer | dvs1 | 2024-10-25 13:40:21 +1000 |
commit | 5833e7483357daa24b8ddc1f766a6446d0d30495 (patch) | |
tree | de47d4ced1efa62c865677f7711534bb0b2c7865 /test_.lua | |
parent | TODO++ (diff) | |
download | JackOnAllDevices-5833e7483357daa24b8ddc1f766a6446d0d30495.zip JackOnAllDevices-5833e7483357daa24b8ddc1f766a6446d0d30495.tar.gz JackOnAllDevices-5833e7483357daa24b8ddc1f766a6446d0d30495.tar.bz2 JackOnAllDevices-5833e7483357daa24b8ddc1f766a6446d0d30495.tar.xz |
Moved common stuff like --help, --version to an internal options table we scan as well.
Diffstat (limited to 'test_.lua')
-rwxr-xr-x | test_.lua | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -6,10 +6,11 @@ local _ = require '_' | |||
6 | 6 | ||
7 | I'Starting from the top.' | 7 | I'Starting from the top.' |
8 | 8 | ||
9 | local Help = [[ | 9 | Help = [[ |
10 | This is part of the blah blah blah... | 10 | This is part of the blah blah blah... |
11 | ]] | 11 | ]] |
12 | 12 | ||
13 | Version = '0.0 crap' | ||
13 | 14 | ||
14 | local options = | 15 | local options = |
15 | { | 16 | { |
@@ -20,7 +21,7 @@ local options = | |||
20 | stop = {help = 'Command to stop the scanning process, for Sys V init.',}, | 21 | stop = {help = 'Command to stop the scanning process, for Sys V init.',}, |
21 | JACK = {help = 'Command to start the JACK stuff, for users.',}, | 22 | JACK = {help = 'Command to start the JACK stuff, for users.',}, |
22 | STOP = {help = 'Command to stop the JACK stuff, for users.', | 23 | STOP = {help = 'Command to stop the JACK stuff, for users.', |
23 | func = function(a, args, i) | 24 | func = function(self, a, args, i) |
24 | --[=[ | 25 | --[=[ |
25 | _.killEmAll{'qsynth'} | 26 | _.killEmAll{'qsynth'} |
26 | __[[ | 27 | __[[ |
@@ -46,13 +47,6 @@ local options = | |||
46 | ]=] | 47 | ]=] |
47 | end | 48 | end |
48 | }, | 49 | }, |
49 | help = {help = 'Print help.', | ||
50 | func = function(a, args, i) | ||
51 | print(Help) | ||
52 | os.exit(0) | ||
53 | end | ||
54 | }, | ||
55 | ['--help'] = {help}, | ||
56 | } | 50 | } |
57 | 51 | ||
58 | print("start = " .. options.start.value) | 52 | print("start = " .. options.start.value) |