blob: c8ba31c4a7eb9c64a159ab419418a8aaba5ae881 (
plain) (
blame)
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
|
#!/bin/sh
VERSION=4.11
BOARD=$(
if test -e /sys/firmware/devicetree/base/model; then
xargs -0 printf '%s\n' < /sys/firmware/devicetree/base/model |
xargs printf '%s\n' | tail -n2
else
echo Generic
fi | tr -d '[:space:][:punct:]'
)
if [ "$(id -u)" -gt 0 ]; then
echo "Run with sudo..." >&2
exit
fi
case "$RELEASE" in
test | local) REPO="dev.jadupc.com/deb" ;;
*) REPO="deb.jadupc.com" ;;
esac
case "$BOARD" in
TanixTX6) APTBOARD="tanix-tx6" ;;
esac
SWDIR="$(mktemp -d /tmp/.a2s.XXXXXXXXX)"
trap 'rm -rf "$SWDIR"' TERM INT QUIT EXIT
cd "$SWDIR"
apt install curl
ver="$(
curl --disable -sL "https://$REPO/pool/main/j/jadupc-archive-keyring/" |
grep -oE '[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}(\+nmu[0-9]*)?' | sort -uVr | head -n1
)"
curl --disable -sL# "https://$REPO/pool/main/j/jadupc-archive-keyring/jadupc-archive-keyring_${ver}_all.deb" -o keyring.deb
dpkg -i keyring.deb
cat > /etc/apt/sources.list.d/jadupc.list << EOF
deb http://$REPO shopno main${APTBOARD:+ $APTBOARD}
EOF
apt update
if dpkg -s armbian-bullseye-desktop-xfce > /dev/null 2>&1; then
apt purge -y armbian-bullseye-desktop-xfce
fi
apt install -y base-files shopno-os-base shopno-os-apt-notifier shopno-os-log-sync
date "+$VERSION-$BOARD-%Y%m%d" | tee /etc/img-release | xargs -0 printf 'Build version: %s\n'
|