RangHo / dotfiles

My personal configuration and bootstrap files
GNU General Public License v3.0
23 stars 0 forks source link

Dotfile management script looks shit #9

Open RangHo opened 1 year ago

RangHo commented 1 year ago

I don't know what I was thinking, but this whole "literate programming" thing looks horrible. I would keep this whole is-check stuff for the meme, but I should at least change how it looks. Maybe something like below:

Before:

# To check existence of a file
is "/path/to/some/file" file?
if yes; then
    rm -f /path/to/some/file
fi

After:

# To check existence of a file
if is "/path/to/some/file" file; then
    rm -f /path/to/some/file
fi
RangHo commented 1 year ago

While I'm at it, re-organize some functions as well.

For example, append and contains basically does array operations so rename them to array_append and array_contains and group them together.