Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ADMI-GET
- --Made by admicos
- --http://mchub.minecrafttr.com/
- --kodlar asagidadir
- arg = { ... }
- updated = "NO"
- function main()
- if arg[1] then
- package = arg[1]
- yn = "n"
- print("Paket aliniyor...")
- local pInfo = http.get("http://mchub.minecrafttr.com/files/Admicos/admi-get/"..package..".ainf")
- print(pInfo.readAll())
- pInfo.close()
- print("Bu program indirmek istiyormusunuz? [E/H]")
- yn = read()
- if yn == "e" or yn == "E" then
- local packageURL = http.get("http://mchub.minecrafttr.com/files/Admicos/admi-get/"..package..".apkg")
- packageToWrite = packageURL.readAll()
- local file = fs.open(package, "w")
- file.write(packageToWrite)
- file.close()
- packageURL.close()
- term.clear()
- term.setCursorPos(1,1)
- if package == "update" then
- print("Update basari ile indi! Simdi admi-get'i birdaha calistirin. Update islemi baslayacaktir!")
- end
- print("Paket Alindi! Admi-Get'i kullandiginiz icin tesekkur ederim!")
- end
- else
- if updated == "OK" then
- --do nothing
- else
- error("Kullanim: admi-get <program>", 0)
- end
- end
- end
- if fs.exists("update") then
- yn = "n"
- print("Admi-Get update dosyasi buldu. Update islemi baslasin mi? [E/H]")
- yn = read()
- if yn == "e" or yn == "E" then
- shell.run("rm admi-get")
- shell.run("rename update admi-get")
- updated = "OK"
- end
- end
- if pcall(main) then
- --do nothing
- else
- --print("Boyle bir paket bulunamadi veya programda bir hata olustu!")
- if tostring(err) == "nil" then
- if arg[1] == nil then
- error("Kullanm: admi-get <program>", 0)
- end
- print("Boyle bir program Bulunamadi!")
- else
- print("//Programda Bir hata Olustu!\\\\")
- print("Hata: " .. tostring(err))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement