Boris Buliga

I grow under the sun. When I am not writing code, I am either drinking wine or drinking tea (with these little cups). Cheese is my bread and tracking everything in Emacs is my cheese.

P.S. d12frosted means dice with 12 sides from the Chessex™ frosted series. I used to play. Just a little bit.

(tagged 'mirror-elpa)

Asking for input in Bash

April 12, 2019

Yet another tale about bash script refactoring. This time the configuration script of mirror-elpa had undergone some changes and I like the result so much that I decided to share it.

Imagine that you want your users to give you some input, for example, repository owner and name. And you want the value so desperately, that if the user doesn’t provide one, you ask the user again. On the other hand, you also want to support default values. So for example, if the user doesn’t provide any value, but there is a default value, you could use that.

And you can’t use anything except for bash.

Read more →