summaryrefslogtreecommitdiff
path: root/include/init.sh
AgeCommit message (Collapse)Author
2025-05-02move x_() to lib.shLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-05-02init.sh: move setvars/err_ to lib.shLeah Rowe
these functions make more sense in lib.sh i made mk link lib.sh first, so that the functions on init.sh can still use them. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-29init.sh: fix yet another double quote for dotfilesLeah Rowe
i missed this one, in another recent revision double-quote because of the dot, for bash users Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-29init.sh: don't use eval to read version filesLeah Rowe
it's not necessary, and was the cause of a recent issue, which i mitigated, but why mitigate it? prevent bugs. don't use eval unless absolutely necessary. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-29init.sh: use backslash for dotfiles in evalLeah Rowe
see: commit f0c629dcc6c3f2242a735567cdd6855fa108d1a5 Author: Leah Rowe <leah@libreboot.org> Date: Sat Apr 12 13:51:49 2025 +0100 lib.sh: write version/versiondate to dotfiles and this bug report: https://codeberg.org/libreboot/lbmk/issues/284 The report indicates that the above commit broke bash, when sh (on the user's system) is bash. I know sometimes when using bash, I need to use the back slash when dealing with dots, e.g. when grepping something. Also double quote references to dotfiles, e.g. when directing the output of printf. I never noticed the issue myself, since I use dash. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: make git name/email error more usefulLeah Rowe
instruct the user what to do in these conditions Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: move git name/mail check to xbmk_git_initLeah Rowe
the command -v check has been removed, since this function already calls git immediately, which would accomplish the same thing since that causes an error if git isn't there. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: tidy up the git name/email checkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26mk: move git check to init.sh xbmk_set_versionLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: tidy up xbmk_init()Leah Rowe
more version-related code moved to xbmk_set_version Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26mk: move git_init to init.shLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: minor cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: clean up setvarsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh setvars: make err a printf for evalLeah Rowe
setvars is always invoked with eval, so make the error condition a message for eval, to ensure that it is reliably handled, in case of error condition. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: merge xbmk_child_init with xbmk_initLeah Rowe
the for loop at the end of xbmk_init does essentially the same thing. adapt accordingly, and merge. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: split xbmk_child_init into functionsLeah Rowe
one function, for one task. skeleton functions for performing multiple tasks. that is the basic coding style guideline for lbmk. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: move parent fork to new functionLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26init.sh: Provide more complete error infoLeah Rowe
On initialisation of the child instance, ./mk is executed, but an error from it won't reveal what command was actually executed. This change makes that the case, since x_ does print the command that caused an error. This is useful for debugging. However, we don't want x_ to cause a real exit, because we still need to handle the lock file from the parent instance. Therefore, the first child instance is executed inside a subshell, and xbmk_rval is set if that subshell returns non-zero. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26move variables out of init.sh to othersLeah Rowe
move them where they are used, or if they are used in many places, move them to lib.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26re-split include/init.sh to lib.shLeah Rowe
move non-init functions to lib.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-04-26rename include/lib.sh to init.shLeah Rowe
this is in prep for the next change, where non-init functions will be moved to another file, again named include/lib.sh Signed-off-by: Leah Rowe <leah@libreboot.org>