Advertisement
Fra146

Untitled

Dec 31st, 2020
1,252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local sPath = ".:/sys/bin"
  2. if turtle then
  3.     sPath = sPath..":/sys/bin/turtle"
  4. else
  5.     sPath = sPath..":/sys/bin/computer"
  6. end
  7. if http then
  8.     sPath = sPath..":/sys/bin/http"
  9. end
  10. if term.isColor() then
  11.     sPath = sPath..":/sys/bin/color"
  12. end
  13.  
  14. shell.setPath( sPath )
  15. help.setPath( "/sys/lib64" )
  16.  
  17. shell.setAlias( "ls", "list" )
  18. shell.setAlias( "dir", "list" )
  19. shell.setAlias( "cp", "copy" )
  20. shell.setAlias( "mv", "move" )
  21. shell.setAlias( "rm", "delete" )
  22.  
  23. if fs.exists( "/sys/autorun" ) and fs.isDir( "/sys/autorun" ) then
  24.     local tFiles = fs.list( "/sys/autorun" )
  25.     table.sort( tFiles )
  26.     for n, sFile in ipairs( tFiles ) do
  27.         if string.sub( sFile, 1, 1 ) ~= "." then
  28.             local sPath = "/sys/autorun/"..sFile
  29.             if not fs.isDir( sPath ) then
  30.                 shell.run( sPath )
  31.             end
  32.         end
  33.     end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement