packages: start work on bedrock support

This commit is contained in:
Dylan Araps 2019-01-04 21:20:14 +02:00
parent a2b7de8e6a
commit a5405baec6

View file

@ -1270,6 +1270,12 @@ get_packages() {
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; } pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; } tot() { IFS=$'\n' read -d "" -ra pkgs < <("$@");((packages+="${#pkgs[@]}"));pac "${#pkgs[@]}"; }
[[ -f "/bedrock/etc/bedrock-release" && "$PATH" == */bedrock/cross/* ]] && \
tot() {
IFS=$'\n' read -d "" -ra pkgs < <(for s in $(brl list); do strat -r "${s}" "$@"; done)
((packages+="${#pkgs[@]}")); pac "${#pkgs[@]}"
}
case "$os" in case "$os" in
"Linux" | "BSD" | "iPhone OS" | "Solaris") "Linux" | "BSD" | "iPhone OS" | "Solaris")
# Package Manager Programs. # Package Manager Programs.