From 77c4dc67b26657978fd17604b1315a779ffb685d Mon Sep 17 00:00:00 2001 From: dvs1 Date: Sun, 3 Nov 2024 23:34:26 +1000 Subject: Install command for aataaj. --- aataaj.lua | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'aataaj.lua') diff --git a/aataaj.lua b/aataaj.lua index ce691fa..0a127bf 100755 --- a/aataaj.lua +++ b/aataaj.lua @@ -125,12 +125,32 @@ local options = asoundrcPath = {help = 'Path to our config files and stuff.', value = '/var/lib/aataaj', }, asoundrc = {help = 'Name of asoundrc file.', value = 'asoundrc', }, aliases = {help = 'Aliases for audio devices.', value = {}, }, + install = + { + help = 'Command to install aataaj.lua', + func = function(self, options, a, args, i) + local w = __[[whoami]]:noErr():Do().lines[1] + local d = __[[pwd]]:noErr():Do().lines[1] + if 'root' ~= w then + E'Need to be root user to install.' + else + print('INSTALLING!!!') + __[[#!/bin/bash + echo "Installing PolygLua" + ./PolygLua.lua -vvvv + ln -s aataaj.lua /usr/local/bin/aataaj.lua + ln -s /usr/local/bin/aataaj.lua /etc/init.d/aataaj.lua + update-rc.d aataaj.lua defaults + ]]:log():show():Do() + end + os.exit(0) + end + }, } _.parse(arg, options, 'aataaj') - -- CHANGE these to suit. local GUI = 'qjackctl' if _.runnable('catia') then GUI = 'catia' end -- cgit v1.1