Menu based OS builder
Problems with the current build script
- At the moment this script is a single file, which also requires manual intervention to work.
The parts in the script are not properly divided, and this affects readability of the script.
- There is some redundancy as well.
- The script will try to install packages like
xorriso
everytime it is called.
I understand as that this approach is fine, since the package is already installed it will not affect the build, but this still is not an optimal approach. Creation of the my-live folder also adds to manual intervention as you will need to delete that everytime for new builds to start.
- This script can not be properly integrated into a CI system as it requires manual intervention at times.
the
--interactive shell
option should be removed as it also comes in the middle of implementing a fully automated build system.
Solutions
- A Bash Menu based OS builder.
- Dividing the parts of the script into different individual functions.
This will also make sure that relevant parts of the script are only called when required.
- Extending functionality with placeholder based calls for integrating into CI systems.
.e.g..
sudo ./swecha amd64 e-swecha
or sudo ./swecha amd64 bal-swecha
Since we are already providing required options in the shell command, we do not need to meddle in the process afterwards. This is ideal for implementation into CI systems.
- These placeholder menus could be implemented in parallel to the interactive menus. As the functions will remain same, the calling methods to those functions can be multiple.