mirror of
https://github.com/Kiritow/OpenComputerScripts.git
synced 2024-03-22 13:10:46 +08:00
Grab v2.2.2-alpha
This commit is contained in:
parent
e5feaedfb9
commit
269112c14c
14
grab.lua
14
grab.lua
|
@ -8,7 +8,7 @@ local serialization=require('serialization')
|
||||||
local event=require('event')
|
local event=require('event')
|
||||||
local args,options=shell.parse(...)
|
local args,options=shell.parse(...)
|
||||||
|
|
||||||
local grab_version="Grab v2.2.1-alpha"
|
local grab_version="Grab v2.2.2-alpha"
|
||||||
|
|
||||||
local valid_options={
|
local valid_options={
|
||||||
["cn"]=true, ["help"]=true, ["version"]=true, ["proxy"]=true, ["skip_install"]=true
|
["cn"]=true, ["help"]=true, ["version"]=true, ["proxy"]=true, ["skip_install"]=true
|
||||||
|
@ -285,7 +285,7 @@ if(args[1]=="install") then
|
||||||
for this_lib in pairs(to_install) do
|
for this_lib in pairs(to_install) do
|
||||||
io.write(this_lib .. " ")
|
io.write(this_lib .. " ")
|
||||||
count_libs=count_libs+1
|
count_libs=count_libs+1
|
||||||
for k in ipairs(db[this_lib].files) do
|
for k in pairs(db[this_lib].files) do
|
||||||
count_files=count_files+1
|
count_files=count_files+1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -352,7 +352,15 @@ if(args[1]=="install") then
|
||||||
for this_lib in pairs(to_install) do
|
for this_lib in pairs(to_install) do
|
||||||
if(db[this_lib].installer) then
|
if(db[this_lib].installer) then
|
||||||
print("Running installer for " .. this_lib .. "...")
|
print("Running installer for " .. this_lib .. "...")
|
||||||
os.execute(db[this_lib].installer)
|
local fn,err=loadfile(db[this_lib].installer)
|
||||||
|
if(not fn) then
|
||||||
|
print("[Installer Error]: " .. err)
|
||||||
|
else
|
||||||
|
local ok,xerr=pcall(fn)
|
||||||
|
if(not ok) then
|
||||||
|
print("[Installer Error]: " .. xerr)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print("Installed " .. count_libs .. " libraies with " .. count_files .. " files.")
|
print("Installed " .. count_libs .. " libraies with " .. count_files .. " files.")
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
echo "Thank you for installing Grab - The official OpenComputerScripts Installer."
|
|
||||||
grab update
|
|
||||||
echo "Programs info has been updated."
|
|
3
grab_installer.lua
Normal file
3
grab_installer.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
print("Thank you for installing Grab - The official OpenComputerScripts Installer.")
|
||||||
|
os.execute("grab update")
|
||||||
|
print("Programs info has been updated.")
|
|
@ -4,9 +4,9 @@
|
||||||
info="Grab - Official OpenComputerScripts Installer",
|
info="Grab - Official OpenComputerScripts Installer",
|
||||||
files={
|
files={
|
||||||
"grab.lua",
|
"grab.lua",
|
||||||
["grab_installer"]="/tmp/.grab_installer"
|
["grab_installer.lua"]="/tmp/.grab_installer.lua"
|
||||||
},
|
},
|
||||||
installer="/tmp/.grab_installer"
|
installer="/tmp/.grab_installer.lua"
|
||||||
},
|
},
|
||||||
["checkarg"]={
|
["checkarg"]={
|
||||||
title="Arugment Checker",
|
title="Arugment Checker",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user