feat: implement cross-handler depencies
This commit is contained in:
parent
0f01612145
commit
8bdbc527f0
6 changed files with 12 additions and 2 deletions
|
@ -78,6 +78,8 @@ but a package with the name of a handler of the package has an installable candi
|
|||
the handler will be installed, made available and used.
|
||||
|
||||
## Features
|
||||
- Cross-handler dependencies (e.g. logcli script needs go)
|
||||
-> currently implemented with `HANDLER_dependencies` files
|
||||
|
||||
### What instalee is not
|
||||
- a (central) package repository containing package sources
|
||||
|
@ -92,6 +94,7 @@ the handler will be installed, made available and used.
|
|||
### TODOs
|
||||
- Debug corner cases
|
||||
- Handler preparation - update repos and cache last update time in /tmp
|
||||
- Handler providers e.g. different make mechanisms on arch and debian
|
||||
|
||||
### Windows
|
||||
- Install choco and git offline
|
||||
|
|
9
instalee
9
instalee
|
@ -26,8 +26,9 @@ getentries() {
|
|||
installpkg() {
|
||||
test "$1" = "--quiet" && local quiet=true && shift
|
||||
local pkgs=$(getentries "$1")
|
||||
local pkgdir="$home/packages/$1/"
|
||||
if test -z "$pkgs"; then
|
||||
local handlers=$(find "$home/packages/$1/" -type f -printf "%f\n" 2>/dev/null)
|
||||
local handlers=$(find "$pkgdir" -type f -printf "%f\n" 2>/dev/null)
|
||||
for handler in $handlers
|
||||
do installpkg --quiet "$handler" &&
|
||||
echo "$handler" >> "$home/handlers.available" &&
|
||||
|
@ -43,13 +44,17 @@ installpkg() {
|
|||
set -e
|
||||
local name="$(basename $pkg)"
|
||||
local base="${name%_*}"
|
||||
for dependency in $(cat "${pkgdir}dependencies" "${pkgdir}${base}_dependencies" 2>/dev/null)
|
||||
do runinstalee $dependency
|
||||
done
|
||||
|
||||
local ext="${name#$base}"
|
||||
local handler="$home/handlers/$base"
|
||||
if test -d "$handler"
|
||||
then
|
||||
# This declaration needs to be ahead, otherwise it overrides failing exit codes
|
||||
local args install
|
||||
local args
|
||||
local install
|
||||
args="$(getcontent "$pkg")"
|
||||
args="${args:-$1}"
|
||||
install="$(find "$handler" -name "install$ext" | head -1)"
|
||||
|
|
1
packages/go/apt
Normal file
1
packages/go/apt
Normal file
|
@ -0,0 +1 @@
|
|||
golang
|
0
packages/go/arch
Normal file
0
packages/go/arch
Normal file
0
packages/logcli/arch
Normal file
0
packages/logcli/arch
Normal file
1
packages/logcli/script_dependencies
Normal file
1
packages/logcli/script_dependencies
Normal file
|
@ -0,0 +1 @@
|
|||
go
|
Loading…
Add table
Reference in a new issue