mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Do no update total while installing/updating, etc. Closes #139.
This commit is contained in:
parent
bd7b529581
commit
bba839c9a9
4 changed files with 7 additions and 15 deletions
|
@ -7,9 +7,8 @@ function __fisher_path_update -a path
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
git checkout master --quiet ^ /dev/null
|
|
||||||
|
|
||||||
git stash --quiet ^ /dev/null
|
git stash --quiet ^ /dev/null
|
||||||
|
git checkout master --quiet ^ /dev/null
|
||||||
|
|
||||||
if not git pull --rebase origin master --quiet ^ /dev/null
|
if not git pull --rebase origin master --quiet ^ /dev/null
|
||||||
git rebase --abort --quiet
|
git rebase --abort --quiet
|
||||||
|
@ -18,11 +17,11 @@ function __fisher_path_update -a path
|
||||||
git clean -d --force --quiet
|
git clean -d --force --quiet
|
||||||
end
|
end
|
||||||
|
|
||||||
git stash apply --quiet ^ /dev/null
|
|
||||||
|
|
||||||
if test ! -z "$branch"
|
if test ! -z "$branch"
|
||||||
git checkout "$branch" --quiet
|
git checkout "$branch" --quiet
|
||||||
end
|
end
|
||||||
|
|
||||||
|
git stash apply --quiet ^ /dev/null
|
||||||
|
|
||||||
popd
|
popd
|
||||||
end
|
end
|
||||||
|
|
|
@ -67,7 +67,6 @@ function fisher_install -d "Install plugins"
|
||||||
if set -l name (__fisher_gist_to_name $item)
|
if set -l name (__fisher_gist_to_name $item)
|
||||||
printf "%s\t%s\n" $item $name
|
printf "%s\t%s\n" $item $name
|
||||||
else
|
else
|
||||||
set total (math $total - 1)
|
|
||||||
printf "fisher: Repository '%s' not found.\n" $item > $stderr
|
printf "fisher: Repository '%s' not found.\n" $item > $stderr
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -83,7 +82,7 @@ function fisher_install -d "Install plugins"
|
||||||
|
|
||||||
else
|
else
|
||||||
if test ! -s $fisher_cache/.index
|
if test ! -s $fisher_cache/.index
|
||||||
printf "$indicator Updating Index %s\n" $name > $stderr
|
printf "$indicator Updating the index %s\n" $name > $stderr
|
||||||
|
|
||||||
if spin "__fisher_index_update" --error=/dev/null -f " @\r" > /dev/null
|
if spin "__fisher_index_update" --error=/dev/null -f " @\r" > /dev/null
|
||||||
debug "Update index ok"
|
debug "Update index ok"
|
||||||
|
@ -100,7 +99,6 @@ function fisher_install -d "Install plugins"
|
||||||
set -l path (__fisher_function_to_plugin $item)
|
set -l path (__fisher_function_to_plugin $item)
|
||||||
printf "%s\t%s" "$path" $item
|
printf "%s\t%s" "$path" $item
|
||||||
else
|
else
|
||||||
set total (math $total - 1)
|
|
||||||
printf "fisher: '%s' not found or index out of date.\n" $item > $stderr
|
printf "fisher: '%s' not found or index out of date.\n" $item > $stderr
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -109,7 +107,6 @@ function fisher_install -d "Install plugins"
|
||||||
end | while read -l url name
|
end | while read -l url name
|
||||||
if contains -- $name (fisher_list $fisher_file)
|
if contains -- $name (fisher_list $fisher_file)
|
||||||
if test -z "$option"
|
if test -z "$option"
|
||||||
set total (math $total - 1)
|
|
||||||
set skipped $skipped $name
|
set skipped $skipped $name
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
@ -151,7 +148,6 @@ function fisher_install -d "Install plugins"
|
||||||
end
|
end
|
||||||
|
|
||||||
if not __fisher_path_make "$path" --quiet
|
if not __fisher_path_make "$path" --quiet
|
||||||
set total (math $total - 1)
|
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ function fisher_uninstall -d "Uninstall plugins"
|
||||||
printf "%s\n" $plugins
|
printf "%s\n" $plugins
|
||||||
else
|
else
|
||||||
__fisher_file
|
__fisher_file
|
||||||
|
|
||||||
end | while read -l item path
|
end | while read -l item path
|
||||||
debug "Validate %s" $item
|
debug "Validate %s" $item
|
||||||
|
|
||||||
|
@ -60,7 +60,6 @@ function fisher_uninstall -d "Uninstall plugins"
|
||||||
debug "Validate ok %s" $item
|
debug "Validate ok %s" $item
|
||||||
|
|
||||||
if not set path (__fisher_path_from_plugin $item)
|
if not set path (__fisher_path_from_plugin $item)
|
||||||
set total (math $total - 1)
|
|
||||||
printf "fisher: '%s' not found\n" $item > $stderr
|
printf "fisher: '%s' not found\n" $item > $stderr
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
@ -71,7 +70,6 @@ function fisher_uninstall -d "Uninstall plugins"
|
||||||
|
|
||||||
if not contains -- $name (fisher_list $fisher_file)
|
if not contains -- $name (fisher_list $fisher_file)
|
||||||
if test -z "$option"
|
if test -z "$option"
|
||||||
set total (math $total - 1)
|
|
||||||
set skipped $skipped $name
|
set skipped $skipped $name
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
|
|
@ -47,7 +47,7 @@ function fisher_update -d "Update plugins"
|
||||||
debug "Update %s" $fisher_index
|
debug "Update %s" $fisher_index
|
||||||
debug "Update %s" $fisher_home
|
debug "Update %s" $fisher_home
|
||||||
|
|
||||||
printf "$indicator Updating Index\n" > $stderr
|
printf "$indicator Updating the index\n" > $stderr
|
||||||
|
|
||||||
if not spin "__fisher_index_update 0" --error=$stderr -f " @\r"
|
if not spin "__fisher_index_update 0" --error=$stderr -f " @\r"
|
||||||
debug "Update Index fail"
|
debug "Update Index fail"
|
||||||
|
@ -82,7 +82,7 @@ function fisher_update -d "Update plugins"
|
||||||
printf "%s\n" $plugins
|
printf "%s\n" $plugins
|
||||||
else
|
else
|
||||||
__fisher_file
|
__fisher_file
|
||||||
|
|
||||||
end | while read -l item path
|
end | while read -l item path
|
||||||
|
|
||||||
debug "Validate %s" $item
|
debug "Validate %s" $item
|
||||||
|
@ -96,7 +96,6 @@ function fisher_update -d "Update plugins"
|
||||||
debug "Validate ok %s" $item
|
debug "Validate ok %s" $item
|
||||||
|
|
||||||
if not set path (__fisher_path_from_plugin $item)
|
if not set path (__fisher_path_from_plugin $item)
|
||||||
set total (math $total - 1)
|
|
||||||
printf "fisher: '%s' not found.\n" $item > $stderr
|
printf "fisher: '%s' not found.\n" $item > $stderr
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue