From 1523ea9032fb6db2c5fc1487057ea958158d0883 Mon Sep 17 00:00:00 2001 From: jutty Date: Wed, 10 Jul 2024 17:22:50 -0300 Subject: [PATCH] Move package_manager() to its own file --- src/configuration.sh | 4 ++++ src/index.sh | 2 +- src/package/{package.sh => package_manager.sh} | 6 ------ 3 files changed, 5 insertions(+), 7 deletions(-) rename src/package/{package.sh => package_manager.sh} (89%) diff --git a/src/configuration.sh b/src/configuration.sh index cbd8f6f..a50086f 100644 --- a/src/configuration.sh +++ b/src/configuration.sh @@ -39,3 +39,7 @@ scan_packages() { resolve_packages fi } + +get_user_packages() { + cat "$CONFIG_ROOT/packages" | sort | uniq +} diff --git a/src/index.sh b/src/index.sh index 401c982..b8eb2ff 100644 --- a/src/index.sh +++ b/src/index.sh @@ -1,6 +1,6 @@ . "$TORI_ROOT/src/check.sh" . "$TORI_ROOT/src/configuration.sh" -. "$TORI_ROOT/src/package/package.sh" +. "$TORI_ROOT/src/package/package_manager.sh" . "$TORI_ROOT/src/package/package_resolution.sh" . "$TORI_ROOT/src/utility.sh" . "$TORI_ROOT/src/system.sh" diff --git a/src/package/package.sh b/src/package/package_manager.sh similarity index 89% rename from src/package/package.sh rename to src/package/package_manager.sh index 951dd80..9701f56 100644 --- a/src/package/package.sh +++ b/src/package/package_manager.sh @@ -1,9 +1,3 @@ -# package management functions - -get_user_packages() { - cat $CONFIG_ROOT/packages | sort | uniq -} - package_manager() { local command="$1" local output