38 lines
913 B
Lua
38 lines
913 B
Lua
local _VERSION = '1.3.0';
|
|
|
|
local INSTALL_URL = 'https://raw.githubusercontent.com/guillaumearm/cc-libs/master/install.lua';
|
|
local BETA_INSTALL_URL = 'https://raw.githubusercontent.com/guillaumearm/cc-libs/next/install.lua';
|
|
|
|
local command = ...;
|
|
|
|
local function printUsage()
|
|
print('upgrade usage:');
|
|
print();
|
|
print('\t\t\tupgrade');
|
|
print('\t\t\tupgrade --beta');
|
|
print('\t\t\tupgrade version');
|
|
print('\t\t\tupgrade help');
|
|
end
|
|
|
|
if command == 'version' or command == '-version' or command == '--version' then
|
|
print('upgrade v' .. _VERSION);
|
|
return;
|
|
end
|
|
|
|
if command == 'help' or command == '-help' or command == '--help' then
|
|
printUsage();
|
|
return;
|
|
end
|
|
|
|
if command == '--beta' or command == '-beta' then
|
|
shell.execute('wget', 'run', BETA_INSTALL_URL, '--beta');
|
|
return;
|
|
end
|
|
|
|
if command ~= nil and command ~= '' then
|
|
printUsage();
|
|
return;
|
|
end
|
|
|
|
shell.execute('wget', 'run', INSTALL_URL);
|