This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CRUGG's profile picture

Make a program executeable from anywhere?!

Started by CRUGG, 25 March 2018 - 06:41 PM
CRUGG #1
Posted 25 March 2018 - 08:41 PM
I currently working on something called 'Unixify' which should add Unix-Like programs/commands. The programs are for e.g. located in /root/myprograms/, but I want them to be executeable from anyhwere. How is this possible?
EveryOS #2
Posted 25 March 2018 - 11:14 PM
Startup file

shell.setDir("root/myprograms/")
SuperDyl19 #3
Posted 25 March 2018 - 11:46 PM
You could use a collection of aliases to call programs by another name. Examples are "ls" and "mv" which respectably run the programs "list" and "move". The shell API has the abilities for aliases to be managed within programs. Find some of that information here: http://www.computercraft.info/wiki/Shell_(API)
CRUGG #4
Posted 26 March 2018 - 10:05 AM
Startup file

shell.setDir("root/myprograms/")
Thanks. I'll directly start CCEmuRedux and try it.

You could use a collection of aliases to call programs by another name. Examples are "ls" and "mv" which respectably run the programs "list" and "move". The shell API has the abilities for aliases to be managed within programs. Find some of that information here: http://www.computerc...wiki/Shell_(API)
But I want to add completely new programs like apt-get, ssh, …
Lupus590 #5
Posted 26 March 2018 - 01:58 PM
Use the shell path

http://www.computercraft.info/wiki/Shell.path

and

http://www.computercraft.info/wiki/Shell.setPath
CRUGG #6
Posted 27 March 2018 - 09:55 AM

Big thanks. :D/>