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() {
38
38
}
39
39
40
40
function install_binary {
41
- # mkdir -p ~/bin
41
+ mkdir -p ~ /bin
42
42
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)
45
45
46
- # cd $tmp_dir
46
+ cd $tmp_dir
47
47
48
48
download $1 $2
49
49
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/
56
56
57
- # chmod +x ~/bin/hub${windows:+.exe}
58
- chmod +x ./hub
57
+ chmod +x ~ /bin/hub${windows: +.exe}
59
58
60
59
# verify
61
- hub version
62
- }
60
+ ~ /bin/hub${windows: +.exe} version
63
61
62
+ # cleanup
63
+ rm -rf $tmp_dir
64
+
65
+ cp ~ /bin/hub .
66
+ }
64
67
65
68
function prep_workspace {
66
69
rm -rf ${MYREPO}
You can’t perform that action at this time.
0 commit comments