asdf/lib/commands/plugin-update.sh

13 lines
312 B
Bash
Raw Normal View History

2015-05-17 11:20:51 -07:00
plugin_update_command() {
2015-05-17 00:46:56 -07:00
local package_name=$1
2015-05-17 03:47:45 -07:00
if [ "$package_name" = "--all" ]; then
for dir in $(asdf_dir)/sources/*; do
(cd "$dir" && git pull)
done
2015-05-17 00:46:56 -07:00
else
2015-05-17 11:20:51 -07:00
local plugin_path=$(get_plugin_path $package_name)
check_if_plugin_exists $plugin_path
(cd $plugin_path; git pull)
2015-05-17 00:46:56 -07:00
fi
}