v2.8.1 - Fixed some bugs with using lsdrv/lsblk.
Fixed some problems with invalid argument syntax, and components that don't support labelling.
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
local agcfg = {
|
local agcfg = {
|
||||||
["halyde"] = {
|
["halyde"] = {
|
||||||
["maindir"] = "",
|
["maindir"] = "",
|
||||||
["version"] = "2.8.0",
|
["version"] = "2.8.1",
|
||||||
["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.",
|
["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.",
|
||||||
["directories"] = {
|
["directories"] = {
|
||||||
"halyde/apps",
|
"halyde/apps",
|
||||||
|
|||||||
+13
-1
@@ -1,3 +1,4 @@
|
|||||||
|
local serialize = import("serialize")
|
||||||
local component = import("component")
|
local component = import("component")
|
||||||
local computer = import("computer")
|
local computer = import("computer")
|
||||||
local unicode = import("unicode")
|
local unicode = import("unicode")
|
||||||
@@ -54,6 +55,11 @@ local function defaultHeaders()
|
|||||||
addHeader("label")
|
addHeader("label")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function invalidArgSyntax(err)
|
||||||
|
print(err)
|
||||||
|
return shell.run("help lsdrv")
|
||||||
|
end
|
||||||
|
|
||||||
local outArgIdx = table.find(args,"-o") or table.find(args,"--output")
|
local outArgIdx = table.find(args,"-o") or table.find(args,"--output")
|
||||||
if showAll then
|
if showAll then
|
||||||
everyHeader()
|
everyHeader()
|
||||||
@@ -169,8 +175,12 @@ local function handleComponent(id,type)
|
|||||||
bootable = formatBoolean(isBootable(proxy,type))
|
bootable = formatBoolean(isBootable(proxy,type))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if proxy.getLabel then
|
||||||
local clabel = proxy.getLabel()
|
local clabel = proxy.getLabel()
|
||||||
label=clabel and "\""..clabel.."\"" or "None"
|
label=clabel and serialize.string(clabel) or "None"
|
||||||
|
else
|
||||||
|
label="Unsupported"
|
||||||
|
end
|
||||||
|
|
||||||
local function insertElement(i,v)
|
local function insertElement(i,v)
|
||||||
if not tablePos[i] then return end
|
if not tablePos[i] then return end
|
||||||
@@ -238,6 +248,7 @@ if not showAll then
|
|||||||
if showArgIdx then
|
if showArgIdx then
|
||||||
table.remove(args,showArgIdx)
|
table.remove(args,showArgIdx)
|
||||||
local arg = table.remove(args,showArgIdx)
|
local arg = table.remove(args,showArgIdx)
|
||||||
|
if not arg then return invalidArgSyntax("Argument -s must have a value") end
|
||||||
local func,err = luaExpr(arg)
|
local func,err = luaExpr(arg)
|
||||||
if func then
|
if func then
|
||||||
filter(comps,func)
|
filter(comps,func)
|
||||||
@@ -255,6 +266,7 @@ local sortArgIdx = table.find(args,"-S") or table.find(args,"--sort")
|
|||||||
if sortArgIdx then
|
if sortArgIdx then
|
||||||
table.remove(args,sortArgIdx)
|
table.remove(args,sortArgIdx)
|
||||||
local arg = table.remove(args,sortArgIdx)
|
local arg = table.remove(args,sortArgIdx)
|
||||||
|
if not arg then return invalidArgSyntax("Argument -S must have a value") end
|
||||||
local func,err = luaExpr(arg)
|
local func,err = luaExpr(arg)
|
||||||
if func then
|
if func then
|
||||||
table.sort(comps,function(a,b)
|
table.sort(comps,function(a,b)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
local loadfile = ...
|
local loadfile = ...
|
||||||
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
|
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
|
||||||
|
|
||||||
_G._OSVERSION = "Halyde 2.8.0"
|
_G._OSVERSION = "Halyde 2.8.1"
|
||||||
_G._OSLOGO = ""
|
_G._OSLOGO = ""
|
||||||
local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil
|
local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil
|
||||||
repeat
|
repeat
|
||||||
|
|||||||
Reference in New Issue
Block a user