help text overhaul 2

This commit is contained in:
2024-02-23 19:36:00 +01:00
parent 3df7910290
commit cf49427aba
3 changed files with 11 additions and 5 deletions

View File

@@ -1,2 +0,0 @@
os.execute("mv shortcut.lua /usr/bin/powerman.lua")

View File

@@ -1,6 +1,10 @@
local args = {...}
local helpText = "This is a tool for displaying and managing your Power cells and generators.\n"..
"At the moment there only is an updater: type 'powerman update -h' for more info!"
"Usages:"..
"powerman <option> - no args: starts the application"..
" '' -h - this help text\n" ..
" '' update <update argument>"
if #args<1 then
@@ -19,6 +23,6 @@ elseif args[1] == "update" then
os.execute("/usr/PowerManager/updater.lua -a")
return
else
print('"'..args[1]..'" - Bad argument. you can use: powerman -h')
print('"'..args[1]..'" - Bad argument.\nYou can use: powerman -h')
return
end

View File

@@ -10,7 +10,11 @@ local keyboard=require("keyboard")
local repository = "seesberger/PowerManager"
local targetFilepath = "/usr/PowerManager/"
local helpText = "Usage:\n" .. "updater <nothing> - manual update and install\n".."updater -h - this particular text\n" .. " '' -a - automatic update no install\n" .. " '' -i - automatic update and install"
local helpText = "Usage:\n" ..
"updater <option> - no args: manual update and install\n"..
" '' -h - this help text\n" ..
" '' -a - automatic update no install\n" ..
" '' -i - automatic update and install"
function manualUpdate()
print("Manual repo pull...")