From 6c89639872b825824d2e4291a14c85c30398d940 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Sat, 24 Aug 2024 13:34:22 +0800 Subject: [PATCH] Add firefox.sh (see: tuna/issues#2016) Signed-off-by: Harry Chen --- firefox.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 firefox.sh diff --git a/firefox.sh b/firefox.sh new file mode 100755 index 0000000..4abecae --- /dev/null +++ b/firefox.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -e +set -o pipefail + +_here=`dirname $(realpath $0)` +apt_sync="${_here}/apt-sync.py" +yum_sync="${_here}/yum-sync.py" + +BASE_PATH="${TUNASYNC_WORKING_DIR}" +BASE_URL="${TUNASYNC_UPSTREAM_URL:-"https://packages.mozilla.org/"}" +export REPO_SIZE_FILE=/tmp/reposize.$RANDOM + +YUM_PATH="${BASE_PATH}/yum" +APT_PATH="${BASE_PATH}/apt" + +# =================== APT repos =============================== +# see: https://packages.mozilla.org/apt/dists/mozilla/InRelease +"$apt_sync" --delete "${BASE_URL/}/apt" mozilla main amd64,i386,arm64 "${APT_PATH}" +echo "APT finished" + +"${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm