From b8bf73c17e1827fae13f2cf0928f174c3a261d2a Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 4 Jul 2022 23:09:58 +0200 Subject: [PATCH] feat: nested package groups --- groups/arch-tools | 9 +++++++++ groups/shell-basics | 6 ++++++ groups/{music => shell-music} | 0 groups/shell-tools | 9 +++++++++ handlers.available | 2 +- instalee | 16 ++++++++++------ packages/locate/arch | 1 + packages/locate/deb | 1 + 8 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 groups/arch-tools create mode 100644 groups/shell-basics rename groups/{music => shell-music} (100%) create mode 100644 groups/shell-tools create mode 100644 packages/locate/arch create mode 100644 packages/locate/deb diff --git a/groups/arch-tools b/groups/arch-tools new file mode 100644 index 0000000..48f6a76 --- /dev/null +++ b/groups/arch-tools @@ -0,0 +1,9 @@ +shell-tools +fd +ripgrep +zsh-completions +python-pynvim +unrar +man-pages +base-devel +topgrade diff --git a/groups/shell-basics b/groups/shell-basics new file mode 100644 index 0000000..3720a03 --- /dev/null +++ b/groups/shell-basics @@ -0,0 +1,6 @@ +curl +git +zsh +bat +neovim +man-db diff --git a/groups/music b/groups/shell-music similarity index 100% rename from groups/music rename to groups/shell-music diff --git a/groups/shell-tools b/groups/shell-tools new file mode 100644 index 0000000..b210f70 --- /dev/null +++ b/groups/shell-tools @@ -0,0 +1,9 @@ +shell-basics +tree +wget +texinfo +fzf +expect +zoxide +locate +diffr diff --git a/handlers.available b/handlers.available index 2e5b579..8cbeba6 100644 --- a/handlers.available +++ b/handlers.available @@ -1,5 +1,5 @@ -arch aur +arch script zsh linux diff --git a/instalee b/instalee index b93a70e..c5d8c4d 100755 --- a/instalee +++ b/instalee @@ -80,17 +80,21 @@ case "$1" in ;; esac -exitcode=0 -while test $# -gt 0; do +runinstalee() { groupfile="$home/groups/$1" if test -f "$groupfile" then for pkg in $(getcontent "$groupfile") - do installpkg "$pkg" || - "$home/handlers/$(head -1 handlers.available)/install" "$pkg" - done + do runinstalee "$pkg" || + "$home/handlers/$(head -1 handlers.available)/install" "$pkg" + done else installpkg "$1" - exitcode=$(expr $exitcode \| $?) fi +} + +exitcode=0 +while test $# -gt 0; do + runinstalee "$1" + exitcode=$(expr $exitcode \| $?) shift done exit $exitcode diff --git a/packages/locate/arch b/packages/locate/arch new file mode 100644 index 0000000..3276670 --- /dev/null +++ b/packages/locate/arch @@ -0,0 +1 @@ +plocate diff --git a/packages/locate/deb b/packages/locate/deb new file mode 100644 index 0000000..17c5c47 --- /dev/null +++ b/packages/locate/deb @@ -0,0 +1 @@ +mlocate