from Hacker News

Show HN: Workman ( ͡° ͜ʖ ͡°) – The Package Installer

by d26900 on 2/12/21, 12:29 AM with 7 comments

  • by d26900 on 2/13/21, 2:05 AM

    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.

  • by d26900 on 2/12/21, 12:44 AM

    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`.)

  • by theamk on 2/12/21, 2:59 AM

    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.