File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 @echo " Golang build test"
33 @echo " Available targets:"
44 @echo " download # download required sources"
5+ @echo " prepare # download and install dependencies"
56 @echo " test # run the test"
67
78version = 1.16.6
@@ -13,6 +14,9 @@ ${tarball}:
1314 wget -O $@ .tmp https://github.com/golang/go/archive/refs/tags/${tarball}
1415 mv $@ .tmp $@
1516
17+ prepare : download
18+ @./install-deps.sh
19+
1620test : download
1721 @./test.sh
1822
2226distclean : clean
2327 rm -f ${tarball}
2428
25- .PHONY : download test clean distclean help
29+ .PHONY : download prepare test clean distclean help
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ . /etc/os-release
6+
7+ sudo=" "
8+ if [[ $( id -u) != 0 ]]; then
9+ sudo=" sudo"
10+ fi
11+
12+ if [[ " $ID " == " fedora" ]]; then
13+ (set -x; $sudo dnf -y install tar golang)
14+ elif [[ " $ID_LIKE " == " debian" ]]; then
15+ (set -x; $sudo apt-get -y install tar golang-go)
16+ else
17+ echo " Unsupported distro!" >&2
18+ exit 1
19+ fi
You can’t perform that action at this time.
0 commit comments