diff options
author | dvs1 | 2024-11-03 22:43:06 +1000 |
---|---|---|
committer | dvs1 | 2024-11-03 22:43:06 +1000 |
commit | b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e (patch) | |
tree | b9dd754866f2ec8372faaa5ac725a1a29dd8f7ea /PolygLua.lua | |
parent | Various failed attempts to get ALSA stuff to talk to a particular sub device. (diff) | |
download | JackOnAllDevices-b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e.zip JackOnAllDevices-b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e.tar.gz JackOnAllDevices-b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e.tar.bz2 JackOnAllDevices-b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e.tar.xz |
PolygLua.lua installs itself.
Diffstat (limited to '')
-rwxr-xr-x | PolygLua.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/PolygLua.lua b/PolygLua.lua index 8d63d8a..34f7f39 100755 --- a/PolygLua.lua +++ b/PolygLua.lua | |||
@@ -312,4 +312,29 @@ _G.__ = function(c) | |||
312 | end | 312 | end |
313 | 313 | ||
314 | 314 | ||
315 | |||
316 | if arg[0] == './PolygLua.lua' then | ||
317 | local w = __[[whoami]]:noErr():Do().lines[1] | ||
318 | local d = __[[pwd]]:noErr():Do().lines[1] | ||
319 | local luas = __'ls -d1 /usr/share/lua/*':noErr():Do() | ||
320 | for i,l in ipairs(luas.lines) do | ||
321 | local lua = '/usr/local/share/lua/' .. l:sub(16) .. '/PolygLua.lua' | ||
322 | if _.exists(lua) then | ||
323 | print(lua .. ' installed') | ||
324 | else | ||
325 | if 'root' == w then | ||
326 | __('mkdir -p /usr/local/share/lua/' .. l:sub(16) .. ' ; ln -s ' .. d .. '/PolygLua.lua ' .. lua):Do() | ||
327 | else | ||
328 | print(lua .. ' NOT installed') | ||
329 | end | ||
330 | end | ||
331 | end | ||
332 | |||
333 | if 'root' ~= w then | ||
334 | E'Need to be root user to install.' | ||
335 | end | ||
336 | end | ||
337 | |||
338 | |||
339 | |||
315 | return _ | 340 | return _ |