c++ calling bash?
Hi all. I am pretty new to programming as a whole... in my first c++ class and have done a little playing around in bash. My question is this:
I have written a bash script to install a bunch of packages (automated linux from scratch). The code was relatively simple, but the problem I have is that you have to do a "chroot" and "login" a couple of times, which gives you a new bash prompt.... you're not in the program any more. I was wondering if I could write a c++ program which will call the bash scripts (one for each new login) and let me make the program run through w/ out the user needing to call another script.
Is there a way to do this? or would it be better to make it purely c++? if so, how would I use c++ to do system stuff (bash operations)?
I did read that other thread here, but I don't think that it's the same problem I have (if it is, I don't understand it).
Any help would be great. Thank you.