I’m not UlrikHD

  • 4 Posts
  • 185 Comments
Joined 3 years ago
cake
Cake day: September 19th, 2023

help-circle






  • First paragraphs in the article

    Writing a package manager is not one of the most common programming tasks. After all, there are many out-of-the-box ones available. Yet, somehow I’ve found myself in exactly this situation.

    How so?

    I’m a big fan of SQLite and its extensions. Given the large number of such extensions in the wild, I wanted a structured approach to managing them. Which usually involves, well, a package manager. Except there is none for SQLite. So I decided to build one!














  • For example, how could it know whether cat $foo should be cat "$foo", or whether the script actually relies on word splitting? It’s possible that $foo intentionally contains multiple paths.

    Last time I used ShellCheck (yesterday funnily enough) I had written ports+=($(get_elixir_ports)) to split the input since get_elixir_ports returns a string of space separated ports. It worked exactly as intended, but ShellCheck still recommended to make the splitting explicit rather than implicit.

    The ShellCheck docs recommended

    IFS=" " read -r -a elixir_ports <<< "(get_elixir_ports)"
    ports+=("${elixir_ports[@]}")