8 comments

[ 0.24 ms ] story [ 51.5 ms ] thread
Might work for Fedora (dnf) as well. I was tired of (re-)installing packages all the time for my different Ubuntu instances (VirtualBox, Dual Boot). So I automated it using Python 3.

All you need to do is to provide a list of packages that you want to install inside `npms.txt`. In the `npms.txt` you can list the package `react` and define the installation commands and options like so:

! npm install

? -g

react

Then you need to run `python3 workman.py` as an administrator. Done! (Don't forget to include the `npms.txt` into your `todos.txt`. The `todos.txt` is a requirement.)

(Note that you can also comment out to-dos from `todos.txt`.)

So... it does all the things regular "setup.sh" script does, but in the non-standard fashion, without any error handling or debugging capabilities?

I recommend learning shell. It is pretty easy, and ideal for those kinds of tasks.

Oh gosh, I wasn't aware of "setup.sh" up until now. へ(>_<へ) *facepalm*

Yes, you are right, my tool is pretty much redundant now (w/o any error handling as you rightfully pointed out).

Anyhow, good riddance, and thanks for your valuable feedback! (This is so embarrassing and painful at the same time for me, but in a good way.)

What is this setup.sh you're talking about? Got any links?
this is any old shell script named setup.sh

here is a random example: https://github.com/emoncms/vagrant/blob/master/provision/set...

in this particular case (a single apt install call), one would only need lines 1 and 15 of that file

as an extra bonus, I like putting "set -x" (print commands before executing) and maybe "set -e" (stop after first error)

(comment deleted)
After theamk's comment, I came to the conclusion that this project was and is a waste of time.

I have now produced an equivalent solution via a Bash script: https://github.com/d26900/Scripts/blob/main/setup.sh

My shortsightedness in this particular case, caused me to opt for a bad solution.

Nevertheless, thanks to the input I received here, I was able to correct this wrongheaded decision of mine.

Thanks again, I think I learned a valuable (life) lesson here.