Advertisement
birdini

Updater

May 17th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. args = {...}
  2.  
  3. os.loadAPI("/api/fileUtils")
  4. os.loadAPI("api/stringUtils")
  5.  
  6. fileStr = fileUtils.readString("/updateList")
  7. lines = stringUtils.splitStr(fileStr,"\n")
  8.  
  9. for i=1,#lines do
  10.  tmpLine = lines[i]
  11.  vals = stringUtils.splitStr(tmpLine,":")
  12.  shell.run("rm",vals[1])
  13.  shell.run("pastebin","get",vals[2],vals[1])
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement