Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sPath = ".:/rom/programs"
- if turtle then
- sPath = sPath..":/rom/programs/turtle"
- else
- sPath = sPath..":/rom/programs/computer"
- end
- if http then
- sPath = sPath..":/rom/programs/http"
- end
- shell.setPath( sPath )
- help.setPath( "/rom/help" )
- shell.setAlias( "ls", "list" )
- shell.setAlias( "dir", "list" )
- shell.setAlias( "cp", "copy" )
- shell.setAlias( "mv", "move" )
- shell.setAlias( "rm", "delete" )
- if os._run then
- print("command alredy loaded")
- return
- end
- os._run=os.run
- function os.run(...)
- local Arg={...}
- local cmd=Arg[2]
- if cmd:match("%.bat$") then
- local file=io.open(cmd,"r")
- if not file then
- print("No such file")
- return false
- end
- local line=file:read()
- while line do
- if not shell.run(line) then
- print("...",line)
- break
- end
- line=file:read()
- end
- file:close()
- return true
- end
- return os._run(...)
- end
- if fs.exists( "autorun.bat" ) and not fs.isDir( "autorun.bat" ) then
- shell.run( "autorun.bat" )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement