asdf/lib/commands/command-plugin-push.bash

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
475 B
Bash
Raw Normal View History

# -*- sh -*-
plugin_push_command() {
local plugin_name=$1
if [ "$plugin_name" = "--all" ]; then
for dir in "$(asdf_data_dir)"/plugins/*/; do
printf "Pushing %s...\n" "$(basename "$dir")"
(cd "$dir" && git push)
done
else
2017-09-04 10:04:56 -07:00
local plugin_path
plugin_path=$(get_plugin_path "$plugin_name")
check_if_plugin_exists "$plugin_name"
printf "Pushing %s...\n" "$plugin_name"
2017-09-04 10:04:56 -07:00
(cd "$plugin_path" && git push)
fi
}
plugin_push_command "$@"