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
13
13
fi
14
14
15
15
clone () {
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
19
24
}
20
25
21
26
# tries cloning:
@@ -30,8 +35,7 @@ clone_plugin() {
30
35
31
36
# clone plugin and produce output
32
37
install_plugin () {
33
- local plugin=" $1 "
34
- local branch=` [ -z " $2 " ] && echo " master" || echo " $2 " `
38
+ local plugin=" $1 " branch=" $2 "
35
39
local plugin_name=" $( plugin_name_helper " $plugin " ) "
36
40
37
41
if plugin_already_installed " $plugin " ; then
You can’t perform that action at this time.
0 commit comments