Monday, 16 February 2009

Bash Scripting 101!

After spending several weeks now working in the Vinux 1.3 release I am gradually coming to the conclusion that I am going to have to write a bash script which automates the whole process. This is because it is taking me several hours to do the whole remastering process from start to finish, and when things go wrong or I want to change something I often have to go back to the beginning and start again. Given that I have a full time job and a family I just don't have the time or the energy to keep putting myself through this, while on the other hand I am not prepared to release something I am not happy with. So the only practical solution is for me to automate the whole process with a bash script, so I can just start it off and come back in a few hours and burn the iso. Some parts of this process are simple, such as installing or removing packages, and some of the configuration is straight forward such modifying a line in a config file. My concern is the configuration of the Orca screen-reader/magnifier and the Compiz 3D effects settings which both seem to have a very large number of configuration files and plugins etc. So I will have to do a bit of detective work to locate where all of the relevant settings are stored and then get out my Bash Scripting Bible and start sweating it out with the command line. In the short term this is going to delay the release of version 1.3, but will mean that in future I will be able to create new releases with a few simple changes to the bash script. In principle the script is very simple, it will just remove any unnecessary packages, install some new ones, configure the accessibility settings etc and then run remastersys to create the new iso. Sounds easy doesn't it? But I bet it isn't as straight-forward as it seems. If I get stuck I will post specific questions on the development forums etc., in the hope that some bash scripting Yoda will bestow his Jedi wisdom upon me. May the force be with me.