Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- install_pine_packages.lua
- -- Runs a sequence of installers from Pinestore, with clear logging and error handling.
- -- Requires: CC:Tweaked with the HTTP API enabled in config (http.enable=true).
- -- Helper: pretty logger with timestamps
- local function log(level, msg)
- local time = textutils.formatTime(os.time(), true)
- print((" [%s] %-5s %s"):format(time, level, msg))
- end
- -- Sanity check: HTTP must be available
- if not http then
- log("ERROR", "HTTP API is disabled. Enable it in the ComputerCraft/CC:Tweaked config and reboot.")
- return
- end
- -- Helper: run `wget run <url>` safely and report outcome
- local function wget_run(url)
- -- `shell.run` executes the shell program `wget` with args `run` and the URL.
- -- Using `pcall` prevents a crash if the download/execution fails.
- local ok, err = pcall(function()
- shell.run("wget", "run", url)
- end)
- if ok then
- log("INFO", "Installed via " .. url)
- return true
- else
- log("ERROR", "Failed for " .. url .. " :: " .. tostring(err))
- return false
- end
- end
- -- ──────────────────────────────────────────────────────────────────────────────
- -- # GUI Library
- -- # https://pinestore.cc/projects/15/basalt
- -- wget run https://pinestore.cc/d/15
- wget_run("https://pinestore.cc/d/15")
- -- # Telemetry Library
- -- # https://pinestore.cc/projects/14/telem
- -- wget run https://pinestore.cc/d/14
- wget_run("https://pinestore.cc/d/14")
- -- # Audio Visualizer
- -- # https://pinestore.cc/projects/99/waveflow-visualizer
- -- wget run https://pinestore.cc/d/99
- wget_run("https://pinestore.cc/d/99")
- -- # Text Editor: cons
- -- # https://pinestore.cc/projects/20/consult
- -- wget run https://pinestore.cc/d/20
- wget_run("https://pinestore.cc/d/20")
- -- # Fancy Fonts
- -- # https://pinestore.cc/projects/37/more-fonts
- -- wget run https://pinestore.cc/d/37
- wget_run("https://pinestore.cc/d/37")
- -- # Jukebox Works 08/01/25
- -- # https://pinestore.cc/projects/143/jukebox
- -- wget run https://pinestore.cc/d/143
- wget_run("https://pinestore.cc/d/143")
- shell.run("mv", "startup.lua", "jukebox")
- shell.run("rm","startup.lua")
- shell.run("mv", "startup", "jukebox")
- shell.run("rm","startup")
- log("INFO", "All installers attempted. Review any ERROR lines above.")
Advertisement
Add Comment
Please, Sign In to add comment