diff --git a/README.md b/README.md index 4916481..1aab33d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/instalee b/instalee index 397131e..1f05273 100755 --- a/instalee +++ b/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)" diff --git a/packages/go/apt b/packages/go/apt new file mode 100644 index 0000000..f5267c2 --- /dev/null +++ b/packages/go/apt @@ -0,0 +1 @@ +golang diff --git a/packages/go/arch b/packages/go/arch new file mode 100644 index 0000000..e69de29 diff --git a/packages/logcli/arch b/packages/logcli/arch new file mode 100644 index 0000000..e69de29 diff --git a/packages/logcli/script_dependencies b/packages/logcli/script_dependencies new file mode 100644 index 0000000..4023f20 --- /dev/null +++ b/packages/logcli/script_dependencies @@ -0,0 +1 @@ +go