diff options
| author | Leah Rowe <vimuser@noreply.codeberg.org> | 2026-07-21 20:43:00 +0200 |
|---|---|---|
| committer | Leah Rowe <vimuser@noreply.codeberg.org> | 2026-07-21 20:43:00 +0200 |
| commit | 83842c94810a6f663fb13f767472849c6d231173 (patch) | |
| tree | 9e90cdf1d5f7eab168b4049b2fc6fa9e2ba9e143 /include | |
| parent | 9dd6ed84cac66e94eb7554a54c96368f27db3d14 (diff) | |
| parent | cf930f3b32791958b912022547cfc95100846691 (diff) | |
Merge pull request 'Add Gentoo dependencies.' (#428) from lordbaraa/lbmk:add-gentoo-dependencies into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/428
Diffstat (limited to 'include')
| -rw-r--r-- | include/init.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/init.sh b/include/init.sh index 7c4e5f9e..1f5da62e 100644 --- a/include/init.sh +++ b/include/init.sh @@ -87,6 +87,21 @@ xbmkpkg() err "pkg_add/pkglist not both set" "xbmkpkg" "$@" fi + if [ "$2" == "gentoo" ]; then + if [ -z "$pkg_use" ] || [ -z "$pkg_use_file" ]; then + err "pkg_use/pkg_use_file not both set" "xbmkpkg" "$@" + fi + + printf "Updating package use...\n" + printf "Writing into $pkg_use_file..." + + if [ ! -d `dirname $pkg_use_file` ]; then + mkdir `dirname $pkg_use_file` + fi + + printf "%s\n" "$pkg_use" >> $pkg_use_file + fi + x_ $pkg_add $pkglist if [ -n "$aur_notice" ]; then @@ -160,7 +175,7 @@ xbmk_set_env() # a parent instance of xbmk never processes its own # command directly; instead, it calls a child instance # of xbmk, and exits with the corresponding return status. - + xbmk_parent_set_env return 0 |
