File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -38,29 +38,32 @@ download() {
3838}
3939
4040function install_binary {
41- # mkdir -p ~/bin
41+ mkdir -p ~ /bin
4242
43- # # https://code-maven.com/create-temporary-directory-on-linux-using-bash
44- # tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
43+ # https://code-maven.com/create-temporary-directory-on-linux-using-bash
44+ tmp_dir=$( mktemp -d -t ci-XXXXXXXXXX)
4545
46- # cd $tmp_dir
46+ cd $tmp_dir
4747
4848 download $1 $2
4949
50- # if [ ! -f "$tmp_dir/bin/hub${windows:+.exe}" ]; then
51- # echo "Failed to obtain $tmp_dir/bin/hub${windows:+.exe}"
52- # exit 1
53- # fi
54- # mkdir -p ~/bin/
55- # mv $tmp_dir/bin/hub${windows:+.exe} ~/bin/
50+ if [ ! -f " $tmp_dir /bin/hub${windows: +.exe} " ]; then
51+ echo " Failed to obtain $tmp_dir /bin/hub${windows: +.exe} "
52+ exit 1
53+ fi
54+ mkdir -p ~ /bin/
55+ mv $tmp_dir /bin/hub${windows: +.exe} ~ /bin/
5656
57- # chmod +x ~/bin/hub${windows:+.exe}
58- chmod +x ./hub
57+ chmod +x ~ /bin/hub${windows: +.exe}
5958
6059 # verify
61- hub version
62- }
60+ ~ /bin/hub${windows: +.exe} version
6361
62+ # cleanup
63+ rm -rf $tmp_dir
64+
65+ cp ~ /bin/hub .
66+ }
6467
6568function prep_workspace {
6669 rm -rf ${MYREPO}
You can’t perform that action at this time.
0 commit comments