Forum
zxb.py as command from Bash - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Help & Support (https://www.boriel.com/forum/forumdisplay.php?fid=16)
+---- Thread: zxb.py as command from Bash (/showthread.php?tid=377)



zxb.py as command from Bash - nitrofurano - 09-29-2011

do someone know how can we have zxb.py 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: zxb.py 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:
Code:
export PATH=$PATH:/opt/zxbasic
Save, exit an reenter in linux. It should work. :roll:


Re: zxb.py as command from Bash - nitrofurano - 09-30-2011

thanks! Smile