From 990e393dd3eb9d464d8b74bcd3b966aa69caa22d Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Fri, 16 Dec 2022 19:30:26 +0100 Subject: [PATCH] feat: restructure groups --- README.md | 12 ++++++++++++ groups/arch/full | 1 + groups/arch/tools | 1 + groups/dev/socha | 1 + groups/shell/all | 4 ++++ groups/shell/enhancements | 2 ++ groups/shell/power | 4 ++++ groups/shell/preview | 3 +++ groups/shell/tools | 6 +++--- groups/work | 1 + instalee | 21 ++++++++++++--------- 11 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 groups/shell/all create mode 100644 groups/shell/enhancements create mode 100644 groups/shell/power create mode 100644 groups/shell/preview diff --git a/README.md b/README.md index 06baa6b..5ff394d 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,18 @@ but the details still need to be fleshed out. - Use system subdirectories for handlers and groups, which are used by default when system is detected +## Notes on this Repository + +### Groups + +- shell/basics: without these a linux machine is hardly usable +- shell/tools: without these, a linux computer is not productively usable for me +- shell/enhancements: replacements for commonly used, dated tools, such as `ls`->`exa` and `top`->`glances` + +### Handlers + + + ## Notable Projects - another universal package manager, diff --git a/groups/arch/full b/groups/arch/full index ea6e460..4b26298 100644 --- a/groups/arch/full +++ b/groups/arch/full @@ -12,3 +12,4 @@ composing refind refind-theme-maia bluetooth +openvpn diff --git a/groups/arch/tools b/groups/arch/tools index 7dc3582..0561902 100644 --- a/groups/arch/tools +++ b/groups/arch/tools @@ -16,3 +16,4 @@ emacs-pdf-tools-git dex inotify-tools entr +dragon-drop diff --git a/groups/dev/socha b/groups/dev/socha index e90d1f4..79a0859 100644 --- a/groups/dev/socha +++ b/groups/dev/socha @@ -3,3 +3,4 @@ jdk/8 notion docker docker-compose +phantomjs-bin diff --git a/groups/shell/all b/groups/shell/all new file mode 100644 index 0000000..8787092 --- /dev/null +++ b/groups/shell/all @@ -0,0 +1,4 @@ +shell/tools +shell/enhancements +shell/preview +shell/power diff --git a/groups/shell/enhancements b/groups/shell/enhancements new file mode 100644 index 0000000..2955af3 --- /dev/null +++ b/groups/shell/enhancements @@ -0,0 +1,2 @@ +exa +glances diff --git a/groups/shell/power b/groups/shell/power new file mode 100644 index 0000000..3200237 --- /dev/null +++ b/groups/shell/power @@ -0,0 +1,4 @@ +youtube-dl +ffmpeg +imagemagick +pandoc diff --git a/groups/shell/preview b/groups/shell/preview new file mode 100644 index 0000000..6510adf --- /dev/null +++ b/groups/shell/preview @@ -0,0 +1,3 @@ +audiowaveform +mtn +rdictcc-git diff --git a/groups/shell/tools b/groups/shell/tools index 6fafaf2..c01fa2b 100644 --- a/groups/shell/tools +++ b/groups/shell/tools @@ -9,8 +9,8 @@ locate diffr tldr kitty -timg -exa strace +timg tmux -glances +jq +dd diff --git a/groups/work b/groups/work index 0807604..ea201a8 100644 --- a/groups/work +++ b/groups/work @@ -2,3 +2,4 @@ dev/tools shell/tools passwords forensics +openvpn diff --git a/instalee b/instalee index 117a2cd..f00d2d3 100755 --- a/instalee +++ b/instalee @@ -12,17 +12,19 @@ destress() { echo "$1" >&2; } # Get the content of a file or the output of its execution getcontent() { - if test -z "$noexec" && test -x "$1" - then "$1" - else cat "$1" - fi + for arg; do + if test -z "$noexec" && test -x "$arg" + then "$arg" + else cat "$arg" + fi + done } # Get available package entries for given package getentries() { cat "$handlersfile" | while read handler - do find "$dir_packages/$1/" -depth -type f -name "$handler*" 2>/dev/null | tac - done + do find "$dir_packages/$1/" -depth -type f -name "$handler*" 2>/dev/null | tac + done } # Install a package by name @@ -142,9 +144,10 @@ installdefault() { } runinstalee() { - local groupfile="$dir_home/groups/$1" - if test -f "$groupfile" - then for package in $(getcontent "$groupfile") + local groupfiles=$(find "$dir_home/groups/$1" -type f 2>/dev/null) + if test -n "$groupfiles" + then + for package in $(getcontent $groupfiles) do runinstalee "$package" || installdefault "$package" done else installpkg "$1" || { test "$default" && installdefault "$1"; }