Short: Ash 0.2a Elate version 1.0 - sh compatible shell Author: Stefan "Zingo" Zivkovic Andersen (amigasdk@zingo.org) Uploader: amigasdk@zingo.org Type: util/shell Version: Ash 0.2a Elate version 1.0 Homepage: zingo.org Distribution: as you like :) Ash 0.2a Elate version 1.0 -------------------------- ASH port to Elate made by Stefan Andersen This is a port of ash a sh compatible shell, the aim of this port is to get a sh compatible shell to run a configure files in. This version of ash does not fork or spawn new processes, everything is executed in order and in stead of pipes files are used. A lots of files are left in /tmp/ash* and have to be deleted by hand afterwards. WARNING this port is to be considered fast an dirty, you may have to alter your configure script for some things anyway like test for compiled files may miss the fact that a .00 is added and lots of other stuff. History ------- I started to port a few Linux/Unix programs but I got tired of always having to generate all configure scripts on the Linux side of my AmigaSDK. I started to port bash but then again there was the same problem of not be able to generate the configure script and though I got it running it was very unstable and behaved very strange. I found out about ash and that it was sh compatible, small and simple. I then decided to port ash instead. I don't know if I will continue this task this is just a step in my developer path, I will now start working on other project but I may return to this code. If you find bugs you can either fix them an mail me or just mail me or just hijack the whole project. I you would like to take over this project and continue to make the ash useful you are more then welcome but please let me know. I have used some code from ixemulNG. Installation ------------ cd to the unpacked directory and run one of 1. make -f makefile.elate This will generate a file called ash.00 that you can use like /ash 2. make -f makefile.elate install This will make the file above and put/overwrite /app/stdio/ash and /app/stdio/sh with ash Some hints ---------- Run this to setup /dev/null before you start any scripts devstart /dev/null /dev/null/elate To make a copy of vpcc named gcc (used my almost all Unix scripts) The cpt tool is availible from ASN in the asn/unclassified directory cpt /app/stdio/vpcc.00 /app/stdio/gcc.00 cpt /app/stdio/vpar.00 /app/stdio/ar.00 cpt /app/stdio/vpld.00 /app/stdio/ld.00 .00 files --------- The Environment variable CMDTAIL is added it will list those extensions that can be added to executable, the default value is CMDTAIL=:.00 More can be added if your target can run them just separate them with a : eg. CMDTAIL=:.00:.13 PATH ---- The default path is changed to include /app/stdio/ and %builtin for internal stuff PATH=:%builtin:/app/stdio zsh --- Some environment variables from zsh is removed those that start with shell. and sle. user.tmp is converted to TMP and user.home variable is converted to HOME Differences ----------- Nothing is sub shelled any more this has to do with that fact that elate is missing the fork() command. This means for examples that when pipes are used 2 temporary files in /tmp is opened and everything is done in sequence of the files are used as input/output, this has the effect that the pipe is slower and uses your hard disk. It will not be done in parallell either. Sometimes scripts rely on a fork to be present and comparing stuff with exit like if (exit; exit); then echo ok; else echo notok; fi this will exit instead of typing ok. To solve this I had to count all "fake" forks and if the exit is invoked and the forkcounter is not on the lowest level it will return instead of exit. this may cause problem if thing are executed after the exit I have not figurate this out completely yet but this solution will probably work in most cases. Known problems -------------- * A lot of fork() are bypassed so the shell will not spawn a new shell exactly what the impact will be beside the program/crashing -> loosing the shell I don't know right now. * Arrows cant be used in the cmd line * is ash is started from ash the environment from ash hasn't followed to the new ash * test -s will miss .00 this is probably not considered a bug but makes those configure script fails TODO * fix environment movement * forked off exit will just return, and continue but it should skip the rest of the scope (break?). Fixed problems -------------- Here are some fixed problem that are not fully tested but seems to work * $0 in scripts * $HOME $TMP and other stuff differs from zsh I have added a conversion if anyone of the zsh version shows up Contact ------- Stefan "Zingo" Zivkovic Andersen amigasdk@zingo.org