Advertisement
subzero22

frozenturtleosinstalldisk

Sep 9th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. local x = 2
  4. function pos1()
  5. term.setCursorPos(x,5)
  6. write("=")
  7. sleep(0.5)
  8. x = x + 1
  9. end
  10.  
  11. function pos2()
  12. term.setCursorPos(1,7)
  13. end
  14.  
  15. shell.run("label", "set", "Frozen Turtle OS Beta v1.1")
  16.  
  17. textutils.slowPrint("Now installing Frozen Turtle Os to your computer")
  18.  
  19. print("Installing...")
  20. term.setCursorPos(1,5)
  21. write("[                  ]")
  22.  
  23. fs.makeDir("notes")
  24. pos2()
  25. print("Making directory notes                  ")
  26. pos1()
  27. fs.makeDir("programs")
  28. pos2()
  29. print("Making directory programs               ")
  30. pos1()
  31. fs.makeDir("OS")
  32. pos2()
  33. print("Making directory OS                     ")
  34. pos1()
  35. pos2()
  36. if fs.exists("start") == true then
  37. print("start is already installed skipping file")
  38. else
  39. fs.copy("disk/start", "start")
  40. print("Installing start                        ")
  41. end
  42. pos1()
  43. pos2()
  44. if fs.exists("OS/.stripmine") == true then
  45. print("slots already installed skipping file   ")
  46. else
  47. fs.copy("disk/stripmine", "OS/.stripmine")
  48. print("Installing slots                        ")
  49. end
  50. pos1()
  51. pos2()
  52. if fs.exists("startup") == true then
  53. print("startup already installed skipping file ")
  54. else
  55. print("Installing startup                      ")
  56. fs.copy("disk/start", "startup")
  57. end
  58. pos1()
  59. pos2()
  60. if fs.exists("OS/.osprotect") == true then
  61. print("osprotect already exists skipping file  ")
  62. else
  63. print("Installing osprotect                    ")
  64. fs.copy("disk/osprotect", "OS/.osprotect")
  65. end
  66. pos1()
  67. pos2()
  68. if fs.exists("OS/run") == true then
  69. print("run already exists skipping file        ")
  70. else
  71. print("Installing startup                      ")
  72. fs.copy("disk/run", "OS/run")
  73. end
  74. pos1()
  75. pos2()
  76. if fs.exists("OS/.computer") == true then
  77. print("computer already exists skipping file   ")
  78. else
  79. print("Installing computer                     ")
  80. fs.copy("disk/computer", "OS/.computer")
  81. end
  82. pos1()
  83. pos2()
  84. if fs.exists("OS/.flatten") == true then
  85. print("calculator already installed skipping.  ")
  86. else
  87. print("Installing calculator                   ")
  88. fs.copy("disk/flatten", "OS/.flatten")
  89. end
  90. pos1()
  91. pos2()
  92. if fs.exists("OS/createfile") == true then
  93. print("create already exists skipping file     ")
  94. else
  95. print("Installing createfile                   ")
  96. fs.copy("disk/createfile", "OS/createfile")
  97. end
  98. pos1()
  99. pos2()
  100. if fs.exists("OS/notepad") == true then
  101. print("notepad already exists skipping file    ")
  102. else
  103. print("installing notepad")
  104. fs.copy("disk/notepad", "OS/notepad            ")
  105. end
  106. pos1()
  107. pos2()
  108. if fs.exists("OS/.search") == true then
  109. print("search already exists skipping file     ")
  110. else
  111. print("installing search                       ")
  112. fs.copy("disk/search", "OS/.search")
  113. end
  114. pos1()
  115. pos2()
  116. if fs.exists("readme") == true then
  117. print("readme already exists skipping file     ")
  118. else
  119. print("installing readme                       ")
  120. fs.copy("disk/readme", "readme")
  121. end
  122. pos1()
  123. pos2()
  124. if fs.exists("OS/noteread") == true then
  125. print("noteread already exists skipping file   ")
  126. else
  127. print("Installing noteread                     ")
  128. fs.copy("disk/noteread", "OS/noteread")
  129. end
  130. pos1()
  131. pos2()
  132. if fs.exists("notes/test") == true then
  133. print("test already exists skipping file       ")
  134. else
  135. print("Installing test                         ")
  136. fs.copy("disk/test", "notes/test")
  137. end
  138. pos1()
  139. pos2()
  140. if fs.exists("OS/.floor") == true then
  141. print("tarnchat already exists skipping file   ")
  142. else
  143. print("Installing tarchchat                    ")
  144. fs.copy("disk/floor", "OS/.floor")
  145. end
  146. pos1()
  147. pos2()
  148. if fs.exists("OS/editor") == true then
  149. print("editor already exists skipping file     ")
  150. else
  151. print("Installing editor                       ")
  152. fs.copy("disk/editor", "OS/editor")
  153. end
  154. if fs.exists("OS/.wall") == true then
  155. print("editor already exists skipping file     ")
  156. else
  157. print("Installing editor                       ")
  158. fs.copy("disk/wall", "OS/.wall")
  159. end
  160. pos1()
  161. pos2()
  162. print()
  163. print("Would you like to install a lock on this")
  164. print("computer? (yes) or (no)")
  165. lock = string.lower(read())
  166. if lock == "yes" then
  167. if fs.exists("OS/.lock") == true then
  168. pos2()
  169. print("lock already installed skipping file")
  170. else
  171. print("Enter password that would like")
  172. print("This will be the only time your pw is shown.")
  173. print()
  174. write("> ")
  175. local pass = read()
  176. local file = fs.open("OS/.password","w")
  177. file.writeLine(pass)
  178. file.close()
  179.  
  180. print("Installing lock")
  181. fs.copy("disk/lock", "OS/.lock")
  182. fs.copy("disk/oslock", "OS/.oslock")
  183. end
  184. else
  185. print("No lock will be installed")
  186. end
  187.  
  188. print()
  189. print("Installation complete. Please press any")
  190. print("key to start Frozen OS")
  191. os.pullEvent("key")
  192. shell.run("OS/.osprotect")
  193. shell.run("OS/.computer")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement