Incorporate changes from @vifino to support armv{6,7}l/Alpine Linux.

Closes #3
This commit is contained in:
Kenny Parnell 2018-01-22 11:00:40 -05:00
parent 01994416c6
commit ceb54998d2
3 changed files with 9 additions and 4 deletions

View File

@ -19,8 +19,8 @@ Feel free to create an issue or pull request if you find a bug.
## Issues
* Assumes Linux or Mac
* Assumes x86_64 or 386
* Assumes Linux, FreeBSD, or Mac
* Assumes x86_64, i386, i686, armv6l or armv7l
## License
MIT License

View File

@ -23,7 +23,12 @@ get_arch () {
case "$(uname -m)" in
x86_64|amd64) arch="amd64"; ;;
*) arch="386"; ;;
i686|i386) arch="386"; ;;
armv6l|armv7l) arch="armv6l"; ;;
*)
echo "Arch '$(uname -m)' not supported!" >&2
exit 1
;;
esac
echo -n $arch

View File

@ -52,7 +52,7 @@ echo ${VERSIONS[@]} \
| tr ' ' '\n' \
| grep '.tar.gz' \
| grep '\(linux\|darwin\|freebsd\)' \
| grep '\-\(amd64\|386\)\.' \
| grep '\-\(amd64\|386\|armv6l\|armv7l\)\.' \
| sed -e 's/^go\([^.]*\).\([^.]*\).\([^.]*\).*/\1.\2.\3/' \
| sed -e 's/.\(linux\|darwin\|freebsd\|src\).*$//' \
| uniq \