Working on installer.to with SCoRe Lab for GSoC 2020: Week 6

Heshan Geasman
SCoRe Lab
Published in
1 min readJul 8, 2020

My previous Medium article got published under SCoRe as https://medium.com/scorelab/working-on-installer-to-with-score-lab-for-gsoc-2020-week-4-cdf6a3ac9ea1

This week I spent time adding improvements to the installer generator Python script. We got a problem with the usage of sudo in installer scripts and my mentors suggested giving a keyword as @sudo

What we do is, we replace @sudo with $SUDO variable and add a script to check if sudo is needed or not to execute the commands. What the script does is checks if the user is a root user. If the user is not a root user, then we check if sudo is there in the system. If not, we gives an error and exist. If user has sudo, then we set sudo to $SUDO. If the user is a root user, then we set empty to $SUDO. This way, we can allow the installer steps to intelligently use sudo.

People who write the installer steps in TOML doesn’t need to worry about these, the generator does all the hard work there.

I also added curl as a installer method for scripts that needs downloading stuff from internet. This will be useful for scripts that already has installer scripts like gcloud tool.

I’m looking into ways to minify the bash scripts, this way we can make the scripts smaller. Then users will be able to download the scripts quickly.

--

--