tunasync-scripts/llvm-apt.sh
2020-06-02 19:48:31 +08:00

21 lines
506 B
Bash
Executable File

#!/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://apt.llvm.org"}
export REPO_SIZE_FILE=/tmp/reposize.$RANDOM
for os in "xenial" "bionic" "focal" "stretch" "buster"; do
prefix=llvm-toolchain-$os
"$apt_sync" --delete "$BASE_URL/$os" $prefix,$prefix-9,$prefix-10 main amd64 "$BASE_PATH/$os"
done
echo "APT finished"
"${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm