aboutsummaryrefslogtreecommitdiffstats
path: root/PolygLua.lua
diff options
context:
space:
mode:
authordvs12024-11-03 22:43:06 +1000
committerdvs12024-11-03 22:43:06 +1000
commitb3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e (patch)
treeb9dd754866f2ec8372faaa5ac725a1a29dd8f7ea /PolygLua.lua
parentVarious failed attempts to get ALSA stuff to talk to a particular sub device. (diff)
downloadJackOnAllDevices-b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e.zip
JackOnAllDevices-b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e.tar.gz
JackOnAllDevices-b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e.tar.bz2
JackOnAllDevices-b3e3ad2eef3fbe1e78f02173ae8fb0d970c1728e.tar.xz
PolygLua.lua installs itself.
Diffstat (limited to '')
-rwxr-xr-xPolygLua.lua25
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)
312end 312end
313 313
314 314
315
316if 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
336end
337
338
339
315return _ 340return _