compile within bash function?
Hi all. I am trying to write (what i thought was a simple) bash script which will install some packages. It works o.k., until it gets to the make command in the function.... then my computer locks up and when i get this:
fork: Resource temporarily unavailable I looked that up and it seems that it's because i don't have enough virtual memory? that can't be though.... i have WAY too much. I guess it's something wrong with my syntax, but i can't figure out what. I can make functions w/ simple stuff like "echo $PWD" and what not, but this: function bash { cd bash-2.05a/ ./configure --enable-static-link \ --prefix=$LFS/static --with-curses make make install cd .. } Just doesn't want to work. I have played around w/ adding &&'s, ;;'s, break's and other stuff, but nothing works. I origonally had this: for i in $( ls | grep bash ) do cd $i instead of "cd bash-2.05a/", but that didn't even let me get to the configure script. Anybody know what i am doing wrong? Any help would be greatly appreciated. Thanks in advance -Adam |
Well, I ended up getting it all to work, the latter problem was resolved with "done" after do cd $i. (instead of at the end of the function). I ended up doing "export <function>" after each one, and then calling them from an OPTIONS/select table.
|
All times are GMT -5. The time now is 10:19 AM. |