diff options
author | 2023-03-07 14:50:14 +0600 | |
---|---|---|
committer | 2023-03-07 14:50:14 +0600 | |
commit | 1661a394be92e5128ddb0d56b78a0eeff046e1df (patch) | |
tree | 4fd0f07d522c9d0809feb8d65132199f74723060 | |
parent | 7d7d81dec45faf8574c0bf2a9c4f0159e2a47a70 (diff) | |
download | patches-1661a394be92e5128ddb0d56b78a0eeff046e1df.tar.gz patches-1661a394be92e5128ddb0d56b78a0eeff046e1df.zip |
armbian2shopno: Implement handling OTA for public release
Signed-off-by: Mubashshir <ahm@jadupc.com>
-rw-r--r-- | patch/armbian2shopno | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/patch/armbian2shopno b/patch/armbian2shopno index e814586..7daad14 100644 --- a/patch/armbian2shopno +++ b/patch/armbian2shopno @@ -4,6 +4,15 @@ if [ "$(id -u)" -gt 0 ]; then exit fi +case "$RELEASE" in + test | local) REPO="builder.jadupc.com/deb" ;; + *) REPO="deb.jadupc.com" ;; +esac + +case "$BOARD" in + tx6) BOARD="tanix-tx6" ;; +esac + SWDIR="$(mktemp -d /tmp/.a2s.XXXXXXXXX)" trap 'rm -rf "$SWDIR"' TERM INT QUIT EXIT cd "$SWDIR" @@ -11,15 +20,15 @@ cd "$SWDIR" apt install curl file="$( - curl --disable -sL https://builder.jadupc.com/deb/pool/main/j/jadupc-archive-keyring/ | + curl --disable -sL "https://$REPO/pool/main/j/jadupc-archive-keyring/" | grep -oEm1 'jadupc-archive-keyring_[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}_all\.deb' | sort -u )" -curl --disable -sL# "https://builder.jadupc.com/deb/pool/main/j/jadupc-archive-keyring/$file" -o keyring.deb +curl --disable -sL# "https://$REPO/pool/main/j/jadupc-archive-keyring/$file" -o keyring.deb dpkg -i keyring.deb cat > /etc/apt/sources.list.d/jadupc.list << EOF -deb http://builder.jadupc.com/deb shopno main tanix-tx6 +deb http://$REPO shopno main${BOARD:+ $BOARD} EOF apt update |