View difference between Paste ID: kunTkTg6 and S3nsEPFs
SHOW: | | - or go back to the newest paste.
1
shell.run("rm", "startup2")
2
shell.run("rm", "scripts/startup2")
3
4
function generateURL(filename, branch)
5
	return "https://bitbucket.org/basketmc/computercraft/raw/" .. branch .. "/" .. filename .. ".lua"
6
end
7
8
function download(filename, branch)
9
	print("Downloading " .. filename)
10
	local data = http.get(generateURL(filename, branch))
11
	if data then
12-
		print(filename.. " downloaded")
12+
		print(filename .. " downloaded")
13
		local file = fs.open(filename, "w")
14
		file.write(data.readAll())
15
		file.close()
16
		return true
17
	end
18
end
19
20
shell.run("mkdir", "scripts")
21
22-
download("scripts/startup2", "master")
22+
download("scripts/startup2", "S01E04")
23
24
shell.run("scripts/startup2")