mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Display deps as they install along with parent plugin.
This commit is contained in:
parent
bee326dc3d
commit
85bbcccd27
2 changed files with 9 additions and 23 deletions
|
@ -1,13 +1,7 @@
|
||||||
function __fisher_deps_install -a path
|
function __fisher_deps_install -a path
|
||||||
printf 0
|
for file in $path/{fishfile,bundle}
|
||||||
|
if test -s $file
|
||||||
if test -s $path/bundle -o -s $path/fishfile
|
fisher_install < $file | sed -En 's/^.+([0-9]+) plugin\/s.*/\1/p'
|
||||||
printf "Installing dependencies >> (%s)\n" (
|
end
|
||||||
for file in $path/{bundle,fishfile}
|
end | awk '{ n = n + $0 } END { print n ? n : 0 }'
|
||||||
__fisher_list $file
|
|
||||||
end | paste -sd ' ' -
|
|
||||||
) > /dev/stderr
|
|
||||||
|
|
||||||
cat $path/{bundle,fishfile} | fisher_install ^| sed -En 's/([0-9]+) plugin\/s.*/\1/p'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,16 +8,12 @@ function -S setup
|
||||||
|
|
||||||
function fisher_install
|
function fisher_install
|
||||||
set -l count 0
|
set -l count 0
|
||||||
|
|
||||||
while read -l plugin
|
while read -l plugin
|
||||||
|
|
||||||
# Fisherman CLI text message are usually written to /dev/stderr,
|
|
||||||
# so we must write to /dev/stderr too.
|
|
||||||
|
|
||||||
echo $plugin > /dev/stderr
|
|
||||||
set count (math $count + 1)
|
set count (math $count + 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
echo "$count plugin/s" > /dev/stderr
|
echo "Aye! $count plugin/s installed."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,14 +22,10 @@ function -S teardown
|
||||||
functions -e fisher_install
|
functions -e fisher_install
|
||||||
end
|
end
|
||||||
|
|
||||||
test "$TESTNAME - List dependencies to be installed"
|
|
||||||
(__fisher_deps_install $path > /dev/null ^| sed -E 's/.*>> (.*)/\1/') = "(foo bar baz norf)"
|
|
||||||
end
|
|
||||||
|
|
||||||
test "$TESTNAME - Install dependencies from one or more bundle/fishfile files"
|
test "$TESTNAME - Install dependencies from one or more bundle/fishfile files"
|
||||||
(__fisher_deps_install $path ^ /dev/null) = 04
|
(__fisher_deps_install $path ^ /dev/null) = 4
|
||||||
end
|
end
|
||||||
|
|
||||||
test "$TESTNAME - Fail to indicate no dependencies were installed"
|
test "$TESTNAME - Print 0 to indicate no dependencies were installed"
|
||||||
(__fisher_deps_install $path/void) = 0
|
(__fisher_deps_install $path/void) = 0
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue