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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
. $(dirname $0)/common.sh
if echo "$TAR" | grep -q "Sentinel_LDK_Linux_Run-time_Installer_script.tar.gz" ; then
erc $TAR || fatal
TAR="Sentinel_LDK_Linux_Run-time_Installer_script/aksusbd-*.tar.gz"
fi
if echo "$TAR" | grep -q "aksusbd" ; then
erc $TAR || fatal
else
fatal "How no idea how to handle $TAR"
fi
# select package by package type and target arch
pkgtype="$(epm print info -p)"
if [ "$pkgtype" = "rpm" ] ; then
case "$(epm print info -a)" in
x86_64)
arch="x86_64"
;;
x86)
arch="i386"
;;
aarch64)
arch="aarch64"
;;
armhf)
arch="armv7hl"
;;
*)
fatal "Unsupported arch"
;;
esac
pkg="aksusbd-*.$arch.rpm"
else
case "$(epm print info -a)" in
x86_64)
arch="amd64"
;;
x86)
arch="i386"
;;
aarch64)
arch="arm64"
;;
armhf)
arch="armhf"
;;
*)
fatal "Unsupported arch"
;;
esac
pkg="aksusbd_*_$arch.deb"
fi
mv -v $PRODUCT*/pkg/$pkg . || fatal
return_tar $pkg