mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
fix: rename internal plugin repository functions (#1537)
This commit is contained in:
parent
491ef2a9f2
commit
5367f1f090
@ -1,7 +1,7 @@
|
|||||||
# -*- sh -*-
|
# -*- sh -*-
|
||||||
|
|
||||||
plugin_list_all_command() {
|
plugin_list_all_command() {
|
||||||
initialize_or_update_repository
|
initialize_or_update_plugin_repository
|
||||||
|
|
||||||
local plugins_index_path
|
local plugins_index_path
|
||||||
plugins_index_path="$(asdf_data_dir)/repository/plugins"
|
plugins_index_path="$(asdf_data_dir)/repository/plugins"
|
||||||
|
@ -63,7 +63,7 @@ plugin_add_command() {
|
|||||||
if [ -n "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
local source_url=$2
|
local source_url=$2
|
||||||
else
|
else
|
||||||
initialize_or_update_repository
|
initialize_or_update_plugin_repository
|
||||||
local source_url
|
local source_url
|
||||||
source_url=$(get_plugin_source_url "$plugin_name")
|
source_url=$(get_plugin_source_url "$plugin_name")
|
||||||
fi
|
fi
|
||||||
|
@ -50,7 +50,7 @@ asdf_dir() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
asdf_repository_url() {
|
asdf_plugin_repository_url() {
|
||||||
printf "https://github.com/asdf-vm/asdf-plugins.git\n"
|
printf "https://github.com/asdf-vm/asdf-plugins.git\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,7 +418,7 @@ repository_needs_update() {
|
|||||||
[ "$sync_required" ]
|
[ "$sync_required" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize_or_update_repository() {
|
initialize_or_update_plugin_repository() {
|
||||||
local repository_url
|
local repository_url
|
||||||
local repository_path
|
local repository_path
|
||||||
|
|
||||||
@ -428,7 +428,7 @@ initialize_or_update_repository() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
repository_url=$(asdf_repository_url)
|
repository_url=$(asdf_plugin_repository_url)
|
||||||
repository_path=$(asdf_data_dir)/repository
|
repository_path=$(asdf_data_dir)/repository
|
||||||
|
|
||||||
if [ ! -d "$repository_path" ]; then
|
if [ ! -d "$repository_path" ]; then
|
||||||
@ -436,7 +436,8 @@ initialize_or_update_repository() {
|
|||||||
git clone "$repository_url" "$repository_path"
|
git clone "$repository_url" "$repository_path"
|
||||||
elif repository_needs_update; then
|
elif repository_needs_update; then
|
||||||
printf "updating plugin repository..."
|
printf "updating plugin repository..."
|
||||||
(cd "$repository_path" && git fetch && git reset --hard origin/master)
|
git -C "$repository_path" fetch
|
||||||
|
git -C "$repository_path" reset --hard origin/master
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$(asdf_data_dir)/tmp"
|
mkdir -p "$(asdf_data_dir)/tmp"
|
||||||
|
Loading…
Reference in New Issue
Block a user