File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -127,13 +127,12 @@ if [ -z "$(which hub)" ] || [ "$(hub --version | grep hub\ version | sed -e "s/.
127127 HUB_PLATFORM=" linux-amd64"
128128 fi
129129 if [ -n " ${HUB_PLATFORM} " ]; then
130- if [ " ${HUB_PLATFORM} " == " darwin-amd64" ]; then
131- curl -O -L " https://github.com/github/hub/releases/download/v${HUB_VERSION} /hub-${HUB_PLATFORM} -${HUB_VERSION} .tgz"
132- tar -zxf " hub-${HUB_PLATFORM} -${HUB_VERSION} .tgz" -C " ${DIR} " --strip-components 1 " hub-${HUB_PLATFORM} -${HUB_VERSION} " /bin
133- else
134- wget " https://github.com/github/hub/releases/download/v${HUB_VERSION} /hub-${HUB_PLATFORM} -${HUB_VERSION} .tgz" -O - | \
135- tar xz -C " ${DIR} " --strip-components 1 " hub-${HUB_PLATFORM} -${HUB_VERSION} /bin" -C " ${DIR} " --strip-components 1
136- fi
130+ TEMP_TGZ=" $( mktemp) "
131+ TEMP_DIR=" $( mktemp -d) "
132+ curl -o " $TEMP_TGZ " -L " https://github.com/github/hub/releases/download/v${HUB_VERSION} /hub-${HUB_PLATFORM} -${HUB_VERSION} .tgz"
133+ tar -zxf " $TEMP_TGZ " -C " $TEMP_DIR "
134+ prefix=" $DIR " " $TEMP_DIR /hub-${HUB_PLATFORM} -${HUB_VERSION} /install"
135+ rm " $TEMP_TGZ " ; rm -r " $TEMP_DIR "
137136 else
138137 # There's no easy way to install a recent version of hub: we then create a
139138 # stub with instructions to install it.
You can’t perform that action at this time.
0 commit comments