asdf/lib/commands/command-plugin-push.bash
Edwin Kofler 3492043241
fix: lint errors from scripts/checkstyle.py (#1385)
Co-authored-by: James Hegedus <jthegedus@hey.com>
2022-12-23 20:53:22 +11:00

20 lines
475 B
Bash

# -*- 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
local plugin_path
plugin_path=$(get_plugin_path "$plugin_name")
check_if_plugin_exists "$plugin_name"
printf "Pushing %s...\n" "$plugin_name"
(cd "$plugin_path" && git push)
fi
}
plugin_push_command "$@"