Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- print("There is a new update avaible, APM has been moved to github. Please run 'APM update'")
- PackW =
- {
- "AIOS MAY CHANGE SYSTEM SETTINGS/FILES",
- nil,
- "REACTOR IS INSTALLED AS A STARTUP FILE",
- nil,
- nil,
- nil,
- nil,
- nil,
- nil,
- nil,
- "POST INSTALL PLEASE INSTALL ONCE MORE",
- "YOU ARE ABOUT TO INSTALL PACKMAN IT IS VERY LARGE",
- nil,
- nil,
- nil,
- nil,
- "THIS PROGRAM REQUIERS A SPEAKER",
- "THIS PROGRAM REQUIERS AN ADVANCED COMPUTER!",
- "THIS PROGRAM INTERFACES WITH WEBSOCETS",
- "THIS PROGRAM IS IN EARLY ALPHA",
- "THIS PROGRAM IS IN EARLY ALPHA",
- nil
- }
- PackN =
- {
- {"AIOS","Aiosos","Aio's os"},
- {"ASSAV","ASS-AV","Aios secure shell - antivirus","Aios secure shell"},
- {"REACTOR","CCreactor controller v1.5","CCreactor","ComputerCraft reactor controller V1.5","CCreactor controller"},
- {"ARE","Aios Remote Explorer"},
- {"ARS","Aios Remote server"},
- {"FM2","File Manager 2"},
- {"AFETCH","AioFetch"},
- {"FTP","File Transfer Protocall"},
- {"ANO","Aio Text Editor"},
- {"RemoteSuite","RS","Remote Suite"},
- {"cowsay"},
- {"packman","packmanager","packageman","packagemanager","package manager"},
- {"harbor","packman-harbor","harbour","packman-harbour"},
- {"harbor-extras","harbor extra","harbour-extras","harbour extra","harborE","harbourE"},
- {"palCollection","palleteCollection","pallateCollection","colors collection","colours collection"},
- {"palPal","pallete pal","pellete pal"},
- {"SimplePiano","Piano"},
- {"ScrnSavr","Screen Saver","ScreenSaver"},
- {"SkyNet","IRC","Internet Relay Chat"},
- {"ccLiquidReactor","computercraft liquid reactor"},
- {"ccTurbineReactor","computercraft turbine reactor"},
- {"CCH","computercraftshell","remote shell"}
- }
- PackR =
- {
- nil,
- nil,
- nil,
- nil,
- nil,
- "APM findInstall ANO",
- nil,
- nil, --please see http://www.computercraft.info/forums2/index.php?/topic/22471-file-transfer-protocol-ftp/
- nil,
- "APM findInstall FTP",
- "APM findInstall packman", --please see http://www.computercraft.info/forums2/index.php?/topic/27992-cowsay-for-computercraft/
- nil, --please see http://www.computercraft.info/forums2/index.php?/topic/22268-packman-a-package-management-tool/
- nil, --please see https://forums.computercraft.cc/index.php?topic=91.0
- nil, --please see https://forums.computercraft.cc/index.php?topic=91.0
- "APM findInstall palpal", --please see https://forums.computercraft.cc/index.php?topic=61.0
- nil, --please see https://forums.computercraft.cc/index.php?topic=60.0
- nil, --please see https://forums.computercraft.cc/index.php?topic=383.0
- nil,
- nil, --please see https://forums.computercraft.cc/index.php?topic=71.0
- nil, --Please see file for creddits
- nil, --Please see file for creddits
- "APM findInstall SkyNet"
- }
- PackI =
- {
- "pastebin run mgg84eJ7",
- "pastebin get 6gadUHeS ASS",
- "pastebin get sczNdpjm startup",
- "pastebin get e8HMLxPJ ARE",
- "pastebin get Q9W6KJ2X ARS",
- "pastebin get bX2Rb0b2 FM2",
- "pastebin get tEg6UR0w AFETCH",
- "pastebin get bihLMhkX FTP",
- "pastebin get bkKTcs8H ANO",
- "pastebin get VcKspez7 RemoteSuite",
- "packman install cowsay",
- "pastebin run 4zyreNZy",
- "pastebin run ivRuuLSH",
- "pastebin run ivRuuLSH extras",
- "wget https://raw.githubusercontent.com/Wendelstein7/palCollection-CC/master/palCollection.lua palCollection.lua",
- "wget https://raw.githubusercontent.com/Wendelstein7/palPal-CC/master/palPal.lua palPal.lua",
- "pastebin get ZdSjei8j piano",
- "pastebin get Bq5ERu8F ScrnSavr",
- "wget https://raw.githubusercontent.com/osmarks/skynet/master/client.lua skynet",
- "pastebin get SPPM2HWQ ccLiquidReactor",
- "pastebin get HjAaxXfR ccTurbineReactor",
- "pastebin get bzGHsYhk CCH"
- }
- if #args < 1 then
- print("USE")
- print("APM install <id> {flags}")
- print("APM findInstall <name>")
- print("APM search <name>")
- print("APM update")
- print("APM list {flags}")
- print("APM mirror <id>")
- print("install flags are")
- print("-y to autoinstall")
- print("list flags are")
- print("-i for the IDs")
- end
- function install(args)
- --FOR SECURITY REASONS THE FOLLOWING IS NEEDED DO NOT REMOVE IT!
- sleep(math.random(0.5,1))
- if tonumber(args[2]) < #PackN+1 then
- i = tonumber(args[2])
- if PackW[i] == nil then
- else
- print(PackW[i])
- if args[3] == "-y" then
- print("auto granting!")
- else
- print("Enter Y/n")
- if string.upper(read()) == "Y" then
- else
- print("Aborted install")
- return false
- end
- end
- end
- shell.run(PackI[i])
- if fs.exists(PackR[i]) or fs.exists(PackR[i]..".lua") then
- else
- if args[3] == "-y" then
- shell.run(PackR[i],"-y")
- else
- shell.run(PackR[i])
- end
- end
- else
- end
- end
- function search(name)
- if args[1] == "search" then
- print("The following matches was found:")
- end
- for i=1,#PackN do
- for j=1,#PackN[i] do
- if string.upper(PackN[i][j]) == string.upper(name) then
- if args[1] == "search" then
- print(name,"or",PackN[i][1],"has id",i)
- break
- elseif args[1] == "findInstall" then
- args[2] = i
- return args
- end
- end
- end
- end
- end
- if args[1] == "install" then
- install(args)
- elseif args[1] == "search" then
- search(args[2])
- elseif args[1] == "findInstall" then
- install(search(args[2]))
- elseif args[1] == "list" then
- for i=1,#PackN do
- sleep(1)
- print(PackN[i][1])
- if #args > 1 and args[2] == "-i" then
- print("it has the ID",i)
- end
- end
- elseif args[1] == "update" then
- if fs.exists("APMold") then
- print("It is not safe to update at the moment")
- return false
- end
- shell.run("mv APM APMold")
- shell.run("wget https://raw.githubusercontent.com/TheAio/CC-ALLUDE/main/APM APM")
- if fs.exists("APM") then
- shell.run("rm APMold")
- else
- print("Failed to update")
- shell.run("mv APMold APM")
- end
- elseif args[1] == "mirror" and #args > 1 then
- i = tonumber(args[2])
- if i < #PackN+1 then
- print(PackN[i][1])
- print("can be found useing")
- print(PackI[i])
- if PackR[i] == nil then
- else
- print("after running")
- print(PackR[i])
- end
- end
- end
Advertisement
Comments
-
- This is now a fairly old version, run "wget https://raw.githubusercontent.com/TheAio/CC-APM/main/APM APM" then "APM update" for the most recent version.
Add Comment
Please, Sign In to add comment
Advertisement