Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dl(fn,sn)
- if http then
- local sPath = shell.resolve(sn)
- local response = http.get("http://yukkuridownloader.net/cc/"..fn)
- if response then
- local res = response.readAll()
- response.close()
- local file = fs.open( sPath, "w" )
- file.write( res )
- file.close()
- return "OK",res
- else
- return "ERROR"
- end
- else
- return "ERROR"
- end
- end
- shell.setDir( "/" )
- if fs.exists("spms")==false then
- fs.makeDir("spms")
- shell.setDir( "spms" )
- if dl("ver","now_ver")=="OK" then
- dl("ud","ud")
- shell.setDir( "/" )
- dl("spm","spm")
- dl("startup","startup")
- print("SPM installation completed")
- else
- printError("Installation failed.")
- end
- else
- print("SPM is already installed.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement