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,
|
- Use system subdirectories for handlers and groups,
|
||||||
which are used by default when system is detected
|
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
|
## Notable Projects
|
||||||
|
|
||||||
- another universal package manager,
|
- another universal package manager,
|
||||||
|
|
|
@ -12,3 +12,4 @@ composing
|
||||||
refind
|
refind
|
||||||
refind-theme-maia
|
refind-theme-maia
|
||||||
bluetooth
|
bluetooth
|
||||||
|
openvpn
|
||||||
|
|
|
@ -16,3 +16,4 @@ emacs-pdf-tools-git
|
||||||
dex
|
dex
|
||||||
inotify-tools
|
inotify-tools
|
||||||
entr
|
entr
|
||||||
|
dragon-drop
|
||||||
|
|
|
@ -3,3 +3,4 @@ jdk/8
|
||||||
notion
|
notion
|
||||||
docker
|
docker
|
||||||
docker-compose
|
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
|
diffr
|
||||||
tldr
|
tldr
|
||||||
kitty
|
kitty
|
||||||
timg
|
|
||||||
exa
|
|
||||||
strace
|
strace
|
||||||
|
timg
|
||||||
tmux
|
tmux
|
||||||
glances
|
jq
|
||||||
|
dd
|
||||||
|
|
|
@ -2,3 +2,4 @@ dev/tools
|
||||||
shell/tools
|
shell/tools
|
||||||
passwords
|
passwords
|
||||||
forensics
|
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
|
# Get the content of a file or the output of its execution
|
||||||
getcontent() {
|
getcontent() {
|
||||||
if test -z "$noexec" && test -x "$1"
|
for arg; do
|
||||||
then "$1"
|
if test -z "$noexec" && test -x "$arg"
|
||||||
else cat "$1"
|
then "$arg"
|
||||||
fi
|
else cat "$arg"
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get available package entries for given package
|
# Get available package entries for given package
|
||||||
getentries() {
|
getentries() {
|
||||||
cat "$handlersfile" | while read handler
|
cat "$handlersfile" | while read handler
|
||||||
do find "$dir_packages/$1/" -depth -type f -name "$handler*" 2>/dev/null | tac
|
do find "$dir_packages/$1/" -depth -type f -name "$handler*" 2>/dev/null | tac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install a package by name
|
# Install a package by name
|
||||||
|
@ -142,9 +144,10 @@ installdefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
runinstalee() {
|
runinstalee() {
|
||||||
local groupfile="$dir_home/groups/$1"
|
local groupfiles=$(find "$dir_home/groups/$1" -type f 2>/dev/null)
|
||||||
if test -f "$groupfile"
|
if test -n "$groupfiles"
|
||||||
then for package in $(getcontent "$groupfile")
|
then
|
||||||
|
for package in $(getcontent $groupfiles)
|
||||||
do runinstalee "$package" || installdefault "$package"
|
do runinstalee "$package" || installdefault "$package"
|
||||||
done
|
done
|
||||||
else installpkg "$1" || { test "$default" && installdefault "$1"; }
|
else installpkg "$1" || { test "$default" && installdefault "$1"; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue