1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
BASEPKGNAME=kubo
SUPPORTEDARCHES="x86_64 x86 aarch64 armhf"
PRODUCTALT="'' beta"
VERSION="$2"
DESCRIPTION="Kubo - An IPFS implementation in Go from the official site"
URL="https://github.com/ipfs/kubo"
. $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then
# beta:
# v0.20.0-rc1_linux
# kubo_v*-rc*_linux*.tar.gz
# v0.20.0_linux
# kubo_v*.[0-9]_linux*.tar.gz
[ "$PKGNAME" = "$BASEPKGNAME" ] && VERSION="*.[0-9]_" || VERSION="*-rc*_"
else
VERSION="*_"
fi
arch="$(epm print info -a)"
case "$arch" in
x86_64)
file="linux-amd64.tar.gz"
;;
armhf)
file="linux-arm.tar.gz"
;;
x86)
file="linux-386.tar.gz"
;;
*)
fatal "$arch arch is not supported"
;;
esac
PKGURL="$(eget --list --latest https://github.com/ipfs/kubo/releases "${BASEPKGNAME}_v${VERSION}$file")"
install_pack_pkgurl