Forum as command from Bash - Printable Version

+- Forum (
+-- Forum: Compilers and Computer Languages (
+--- Forum: ZX Basic Compiler (
+---- Forum: Help & Support (
+---- Thread: as command from Bash (/showthread.php?tid=377) as command from Bash - nitrofurano - 09-29-2011

do someone know how can we have as command from Bash, and having Boriel's zx-spectrum compiler placed in some directory inside '/opt/'?
this question is because:

1- would be great having a more comfortable way to use the compiler from the terminal, without having to do a 'cd' inside the compiler directory, just like using tools like zmakebas (available in Ubuntu and Debian repository)

2- would help package maintainers to help creating a package, in formats like .deb, .rpm, etc., and having it available defaulty in their repositories, like on Ubuntu or Debian, we only needed to enter 'sudo apt-get install borielzxspectrumcompiler' (if this could be the name of the package), for installing it

any help is very welcome! thanks! Smile

Re: as command from Bash - boriel - 09-30-2011

You can unzip ZX BASIC in any directory of your choice. E.g. you can put it on /opt/zxbasic/
The you have to add that directory to your PATH. In Linux this is usually done in the .bashrc file, adding the directory to your $PATH environment var.
For example, for /opt/zxbasic, add the following line to your ~/.bashrc file:
export PATH=$PATH:/opt/zxbasic
Save, exit an reenter in linux. It should work. :roll:

Re: as command from Bash - nitrofurano - 09-30-2011

thanks! Smile