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 /aataaj.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 'aataaj.lua')
| -rwxr-xr-x | aataaj.lua | 15 |
1 files changed, 3 insertions, 12 deletions
| @@ -17,7 +17,7 @@ | |||
| 17 | local _ = require '_' | 17 | local _ = require '_' |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | local Help = [[ | 20 | Help = [[ |
| 21 | This is part of the AllAudioToALSAandJACK project, aataaj for short, | 21 | This is part of the AllAudioToALSAandJACK project, aataaj for short, |
| 22 | pronounced like "attach". | 22 | pronounced like "attach". |
| 23 | 23 | ||
| @@ -81,7 +81,7 @@ NOTE - Seems both ALSA and JACK are per user. So you need to run | |||
| 81 | "aataaj JACK" for each user. | 81 | "aataaj JACK" for each user. |
| 82 | 82 | ||
| 83 | ]] | 83 | ]] |
| 84 | 84 | Version = '0.0 crap' | |
| 85 | 85 | ||
| 86 | 86 | ||
| 87 | local options = | 87 | local options = |
| @@ -107,7 +107,7 @@ local options = | |||
| 107 | STOP = | 107 | STOP = |
| 108 | { | 108 | { |
| 109 | help = 'Command to stop the JACK stuff, for users.', | 109 | help = 'Command to stop the JACK stuff, for users.', |
| 110 | func = function(a, args, i) | 110 | func = function(self, a, args, i) |
| 111 | _.killEmAll{'qsynth'} | 111 | _.killEmAll{'qsynth'} |
| 112 | __[[#!/bin/bash | 112 | __[[#!/bin/bash |
| 113 | a2j_control --stop | 113 | a2j_control --stop |
| @@ -132,15 +132,6 @@ local options = | |||
| 132 | os.exit(0) | 132 | os.exit(0) |
| 133 | end | 133 | end |
| 134 | }, | 134 | }, |
| 135 | help = | ||
| 136 | { | ||
| 137 | help = 'Print help.', | ||
| 138 | func = function(a, args, i) | ||
| 139 | print(Help) | ||
| 140 | os.exit(0) | ||
| 141 | end | ||
| 142 | }, | ||
| 143 | ['--help'] = {help}, | ||
| 144 | } | 135 | } |
| 145 | 136 | ||
| 146 | _.parse(arg, options) | 137 | _.parse(arg, options) |
