From c0dc0de23c033195891261bbbf3de221694024b8 Mon Sep 17 00:00:00 2001 From: Shengqi Chen Date: Wed, 18 Sep 2024 15:17:48 +0800 Subject: [PATCH] Add xanmod scripts Signed-off-by: Shengqi Chen --- xanmod.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 xanmod.sh diff --git a/xanmod.sh b/xanmod.sh new file mode 100755 index 0000000..f449eb3 --- /dev/null +++ b/xanmod.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -e +set -o pipefail + +_here=`dirname $(realpath $0)` +apt_sync="${_here}/apt-sync.py" + +BASE_PATH="${TUNASYNC_WORKING_DIR}" +BASE_URL="${TUNASYNC_UPSTREAM_URL:-"https://deb.xanmod.org/"}" +export REPO_SIZE_FILE=/tmp/reposize.$RANDOM + +APT_PATH="${BASE_PATH}/apt" + +# =================== APT repos =============================== +# see: https://deb.xanmod.org/dists/releases/InRelease +"$apt_sync" --delete "${BASE_URL/}" releases main amd64,i386 "${APT_PATH}" +echo "APT finished" + +"${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm