I want to automate one repeated task which I do regularly. That is creating rpm's for different architectures. To compile the code and create the rpm I need to set the project env. after setting the env I will create the rpm for the current architecture and again I should build rpms for other architecture by setting the env again.
I am trying to automate this process. The problem is once the env is set it I will be new shell so my script is not visible in the sub shell. How to automate this ??
This is what i tried.
cd $project_dir
setenv.sh x86 #creates new sub shell
make clean
make rpm
cp *rpm ~/
exit #exit from the sub shell
setenv.sh x86_64 #creates new shell
make clean
make rpm
cp *.rpm ~/
exit
after setting the env to x86 , next commands are not getting executed.