2019-11-27 01:24:29 -07:00
|
|
|
# -*- sh -*-
|
|
|
|
|
2015-05-20 21:25:17 -07:00
|
|
|
plugin_push_command() {
|
|
|
|
local plugin_name=$1
|
|
|
|
if [ "$plugin_name" = "--all" ]; then
|
2018-06-10 01:54:39 -07:00
|
|
|
for dir in "$(asdf_data_dir)"/plugins/*; do
|
2020-09-21 15:27:52 -07:00
|
|
|
printf "Pushing %s...\\n" "$(basename "$dir")"
|
2015-05-20 21:25:17 -07:00
|
|
|
(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"
|
2020-09-21 15:27:52 -07:00
|
|
|
printf "Pushing %s...\\n" "$plugin_name"
|
2017-09-04 10:04:56 -07:00
|
|
|
(cd "$plugin_path" && git push)
|
2015-05-20 21:25:17 -07:00
|
|
|
fi
|
|
|
|
}
|
2019-11-27 01:24:29 -07:00
|
|
|
|
|
|
|
plugin_push_command "$@"
|