summaryrefslogtreecommitdiff
path: root/patch/armbian2shopno
diff options
context:
space:
mode:
Diffstat (limited to 'patch/armbian2shopno')
-rw-r--r--patch/armbian2shopno15
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