Update plugin-push and plugin-update

This commit is contained in:
Akash Manohar J 2015-05-21 10:01:09 +05:30
parent f8b81f13a0
commit 5be6ee1440
2 changed files with 7 additions and 3 deletions

View File

@ -2,11 +2,13 @@ plugin_push_command() {
local plugin_name=$1
if [ "$plugin_name" = "--all" ]; then
for dir in $(asdf_dir)/plugins/*; do
echo "Pushing $(basename $dir)..."
(cd "$dir" && git push)
done
else
local plugin_path=$(get_plugin_path $plugin_name)
check_if_plugin_exists $plugin_path
echo "Pushing $plugin_name..."
(cd $plugin_path; git push)
fi
}

View File

@ -1,12 +1,14 @@
plugin_update_command() {
local package_name=$1
if [ "$package_name" = "--all" ]; then
local plugin_name=$1
if [ "$plugin_name" = "--all" ]; then
for dir in $(asdf_dir)/plugins/*; do
echo "Updating $(basename $dir)..."
(cd "$dir" && git pull)
done
else
local plugin_path=$(get_plugin_path $package_name)
local plugin_path=$(get_plugin_path $plugin_name)
check_if_plugin_exists $plugin_path
echo "Updating $plugin_name..."
(cd $plugin_path; git pull)
fi
}