feat: restructure groups
This commit is contained in:
parent
dba97ec3c6
commit
990e393dd3
11 changed files with 44 additions and 12 deletions
12
README.md
12
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,
|
||||
|
|
|
@ -12,3 +12,4 @@ composing
|
|||
refind
|
||||
refind-theme-maia
|
||||
bluetooth
|
||||
openvpn
|
||||
|
|
|
@ -16,3 +16,4 @@ emacs-pdf-tools-git
|
|||
dex
|
||||
inotify-tools
|
||||
entr
|
||||
dragon-drop
|
||||
|
|
|
@ -3,3 +3,4 @@ jdk/8
|
|||
notion
|
||||
docker
|
||||
docker-compose
|
||||
phantomjs-bin
|
||||
|
|
4
groups/shell/all
Normal file
4
groups/shell/all
Normal file
|
@ -0,0 +1,4 @@
|
|||
shell/tools
|
||||
shell/enhancements
|
||||
shell/preview
|
||||
shell/power
|
2
groups/shell/enhancements
Normal file
2
groups/shell/enhancements
Normal file
|
@ -0,0 +1,2 @@
|
|||
exa
|
||||
glances
|
4
groups/shell/power
Normal file
4
groups/shell/power
Normal file
|
@ -0,0 +1,4 @@
|
|||
youtube-dl
|
||||
ffmpeg
|
||||
imagemagick
|
||||
pandoc
|
3
groups/shell/preview
Normal file
3
groups/shell/preview
Normal file
|
@ -0,0 +1,3 @@
|
|||
audiowaveform
|
||||
mtn
|
||||
rdictcc-git
|
|
@ -9,8 +9,8 @@ locate
|
|||
diffr
|
||||
tldr
|
||||
kitty
|
||||
timg
|
||||
exa
|
||||
strace
|
||||
timg
|
||||
tmux
|
||||
glances
|
||||
jq
|
||||
dd
|
||||
|
|
|
@ -2,3 +2,4 @@ dev/tools
|
|||
shell/tools
|
||||
passwords
|
||||
forensics
|
||||
openvpn
|
||||
|
|
21
instalee
21
instalee
|
@ -12,17 +12,19 @@ destress() { echo "[2m$1[0m" >&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"; }
|
||||
|
|
Loading…
Add table
Reference in a new issue