From fa88749da3192982fe9127ae6fc3b077711b2839 Mon Sep 17 00:00:00 2001 From: Derek Stavis Date: Sun, 1 Nov 2015 21:05:52 -0200 Subject: [PATCH] install: Implement package dependency installation --- pkg/omf/cli/omf.bundle.install.fish | 4 +++- pkg/omf/cli/omf.install.fish | 1 + pkg/omf/cli/omf.update.fish | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/omf/cli/omf.bundle.install.fish b/pkg/omf/cli/omf.bundle.install.fish index 9d0dbbc..908dad2 100644 --- a/pkg/omf/cli/omf.bundle.install.fish +++ b/pkg/omf/cli/omf.bundle.install.fish @@ -1,5 +1,7 @@ function omf.bundle.install - set bundle $OMF_CONFIG/bundle + test -n "$argv"; + and set bundle $argv + or set bundle $OMF_CONFIG/bundle if test -f $bundle set packages (omf.packages.list --installed) diff --git a/pkg/omf/cli/omf.install.fish b/pkg/omf/cli/omf.install.fish index 324c013..1fb77d6 100644 --- a/pkg/omf/cli/omf.install.fish +++ b/pkg/omf/cli/omf.install.fish @@ -34,6 +34,7 @@ function omf.install -a name_or_url echo (omf::dim)"Installing $install_type $name"(omf::off) if omf.repo.clone $url $OMF_PATH/$parent_path/$name + omf.bundle.install $OMF_PATH/$parent_path/$name/bundle omf.bundle.add $install_type $name_or_url __omf.install.success "$install_type $name" diff --git a/pkg/omf/cli/omf.update.fish b/pkg/omf/cli/omf.update.fish index 92716bf..1aee4d3 100644 --- a/pkg/omf/cli/omf.update.fish +++ b/pkg/omf/cli/omf.update.fish @@ -19,6 +19,9 @@ function omf.update -a name not test -e "$path/.git"; and continue omf.repo.pull $path; and set return_success + + set -q return_success; + and omf.bundle.install $path/bundle end set -q return_success; and __omf.update.success "$name"