From b3213f1e654c5c9d0e98efb105cfaf6e0cb5d984 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 23 May 2025 11:54:38 +1000 Subject: Don't bother intalling links if they are there already. Plus re-arrange things a little. --- aataaj.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'aataaj.lua') diff --git a/aataaj.lua b/aataaj.lua index 8b991c1..72bf096 100755 --- a/aataaj.lua +++ b/aataaj.lua @@ -77,13 +77,16 @@ local options = else print('INSTALLING!!!') __[[#!/bin/bash + __[=[#!/bin/bash echo "Installing aataaj" ./PolygLua.lua -vvvv install - ln -s `pwd`/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 + if [[ ! -h /usr/local/bin/aataaj.lua ]]; then + ln -s `pwd`/aataaj.lua /usr/local/bin/aataaj.lua + fi + if [[ ! -h /etc/init.d/aataaj.lua ]]; then + ln -s /usr/local/bin/aataaj.lua /etc/init.d/aataaj.lua + fi mkdir -p /usr/local/share/doc/aataaj - ln -s `pwd`/*.md /usr/local/share/doc/aataaj/ pushd /usr/local/share/doc/aataaj espeak-ng -w your.wav "Your " espeak-ng -w devices.wav " audio devices are - " @@ -108,7 +111,9 @@ local options = espeak-ng -w sixteen.wav "sixteen" espeak-ng -w best.wav "Please type the device number you heard best - " popd - ]]:log():show():Do() + ln -s `pwd`/*.md /usr/local/share/doc/aataaj/ + update-rc.d aataaj.lua defaults + ]=]:log():show():Do() end os.exit(0) end -- cgit v1.1