File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,14 @@ else # shell output functions
1313fi
1414
1515clone () {
16- local plugin=" $1 "
17- cd " $( tpm_path) " &&
18- GIT_TERMINAL_PROMPT=0 git clone -b " $branch " --single-branch --recursive " $plugin " > /dev/null 2>&1
16+ local plugin=" $1 " branch=" $2 "
17+ if [ -n " $branch " ]; then
18+ cd " $( tpm_path) " &&
19+ GIT_TERMINAL_PROMPT=0 git clone -b " $branch " --single-branch --recursive " $plugin " > /dev/null 2>&1
20+ else
21+ cd " $( tpm_path) " &&
22+ GIT_TERMINAL_PROMPT=0 git clone --single-branch --recursive " $plugin " > /dev/null 2>&1
23+ fi
1924}
2025
2126# tries cloning:
@@ -30,8 +35,7 @@ clone_plugin() {
3035
3136# clone plugin and produce output
3237install_plugin () {
33- local plugin=" $1 "
34- local branch=` [ -z " $2 " ] && echo " master" || echo " $2 " `
38+ local plugin=" $1 " branch=" $2 "
3539 local plugin_name=" $( plugin_name_helper " $plugin " ) "
3640
3741 if plugin_already_installed " $plugin " ; then
You can’t perform that action at this time.
0 commit comments