mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
migrating gitlab-runner,influx,termux
This commit is contained in:
parent
e8c9b17760
commit
d79cf7823e
@ -67,7 +67,7 @@ def main():
|
||||
os, comp, arch,
|
||||
str(args.working_dir.absolute()),
|
||||
filelist[1] ]
|
||||
print(shell_args)
|
||||
# print(shell_args)
|
||||
sp.run(shell_args)
|
||||
if args.delete:
|
||||
pass #TODO
|
||||
|
@ -4,16 +4,12 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
. ${_here}/helpers/apt-download
|
||||
|
||||
[ -z "${LOADED_APT_DOWNLOAD}" ] && (echo "failed to load apt-download"; exit 1)
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||
UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"https://packages.gitlab.com/runner/gitlab-ci-multi-runner"}
|
||||
|
||||
YUM_PATH="${BASE_PATH}/yum"
|
||||
|
||||
UBUNTU_VERSIONS=("trusty" "xenial" "bionic")
|
||||
DEBIAN_VERSIONS=("wheezy" "jessie" "stretch" "buster")
|
||||
UBUNTU_PATH="${BASE_PATH}/ubuntu/"
|
||||
DEBIAN_PATH="${BASE_PATH}/debian/"
|
||||
|
||||
@ -53,22 +49,10 @@ if [[ -z ${DRY_RUN:-} ]]; then
|
||||
fi
|
||||
rm $cfg
|
||||
|
||||
if [[ ! -z ${DRY_RUN:-} ]]; then
|
||||
export APT_DRY_RUN=1
|
||||
fi
|
||||
|
||||
base_url="https://packages.gitlab.com/runner/gitlab-ci-multi-runner/ubuntu"
|
||||
for version in ${UBUNTU_VERSIONS[@]}; do
|
||||
apt-download-binary ${base_url} "$version" "main" "amd64" "${UBUNTU_PATH}" || true
|
||||
apt-download-binary ${base_url} "$version" "main" "i386" "${UBUNTU_PATH}" || true
|
||||
done
|
||||
"$apt_sync" "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386 "$UBUNTU_PATH"
|
||||
echo "Ubuntu finished"
|
||||
|
||||
base_url="https://packages.gitlab.com/runner/gitlab-ci-multi-runner/debian"
|
||||
for version in ${DEBIAN_VERSIONS[@]}; do
|
||||
apt-download-binary ${base_url} "$version" "main" "amd64" "${DEBIAN_PATH}" || true
|
||||
apt-download-binary ${base_url} "$version" "main" "i386" "${DEBIAN_PATH}" || true
|
||||
done
|
||||
"$apt_sync" "${UPSTREAM}/debian" @debian-current main amd64,i386 "$DEBIAN_PATH"
|
||||
echo "Debian finished"
|
||||
|
||||
|
||||
|
@ -4,16 +4,12 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
. ${_here}/helpers/apt-download
|
||||
|
||||
[ -z "${LOADED_APT_DOWNLOAD}" ] && (echo "failed to load apt-download"; exit 1)
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||
UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"https://packages.gitlab.com/runner/gitlab-runner"}
|
||||
|
||||
YUM_PATH="${BASE_PATH}/yum"
|
||||
|
||||
UBUNTU_VERSIONS=("trusty" "xenial" "bionic")
|
||||
DEBIAN_VERSIONS=("wheezy" "jessie" "stretch" "buster")
|
||||
UBUNTU_PATH="${BASE_PATH}/ubuntu/"
|
||||
DEBIAN_PATH="${BASE_PATH}/debian/"
|
||||
|
||||
@ -64,23 +60,9 @@ if [[ -z ${DRY_RUN:-} ]]; then
|
||||
fi
|
||||
rm $cfg
|
||||
|
||||
if [[ ! -z ${DRY_RUN:-} ]]; then
|
||||
export APT_DRY_RUN=1
|
||||
fi
|
||||
|
||||
base_url="https://packages.gitlab.com/runner/gitlab-runner/ubuntu"
|
||||
for version in ${UBUNTU_VERSIONS[@]}; do
|
||||
apt-download-binary ${base_url} "$version" "main" "amd64" "${UBUNTU_PATH}" || true
|
||||
apt-download-binary ${base_url} "$version" "main" "i386" "${UBUNTU_PATH}" || true
|
||||
done
|
||||
"$apt_sync" "${UPSTREAM}/ubuntu" @ubuntu-lts main amd64,i386 "$UBUNTU_PATH"
|
||||
echo "Ubuntu finished"
|
||||
|
||||
base_url="https://packages.gitlab.com/runner/gitlab-runner/debian"
|
||||
for version in ${DEBIAN_VERSIONS[@]}; do
|
||||
apt-download-binary ${base_url} "$version" "main" "amd64" "${DEBIAN_PATH}" || true
|
||||
apt-download-binary ${base_url} "$version" "main" "i386" "${DEBIAN_PATH}" || true
|
||||
done
|
||||
"$apt_sync" "${UPSTREAM}/debian" @debian-current main amd64,i386 "$DEBIAN_PATH"
|
||||
echo "Debian finished"
|
||||
|
||||
|
||||
# vim: ts=4 sts=4 sw=4
|
||||
|
@ -4,9 +4,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
. ${_here}/helpers/apt-download
|
||||
|
||||
[ -z "${LOADED_APT_DOWNLOAD}" ] && (echo "failed to load apt-download"; exit 1)
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||
BASE_URL=${TUNASYNC_UPSTREAM_URL:-"https://repos.influxdata.com"}
|
||||
@ -15,8 +13,6 @@ YUM_PATH="${BASE_PATH}/yum"
|
||||
UBUNTU_PATH="${BASE_PATH}/ubuntu"
|
||||
DEBIAN_PATH="${BASE_PATH}/debian"
|
||||
|
||||
UBUNTU_VERSIONS=("trusty" "xenial" "bionic")
|
||||
DEBIAN_VERSIONS=("wheezy" "jessie" "stretch" "buster")
|
||||
EL_VERSIONS=("6" "7" "8")
|
||||
|
||||
mkdir -p ${YUM_PATH} ${UBUNTU_PATH} ${DEBIAN_PATH}
|
||||
@ -24,23 +20,10 @@ mkdir -p ${YUM_PATH} ${UBUNTU_PATH} ${DEBIAN_PATH}
|
||||
wget -O ${BASE_PATH}/influxdb.key ${BASE_URL}/influxdb.key
|
||||
|
||||
# =================== APT repos ===============================
|
||||
if [[ ! -z ${DRY_RUN:-} ]]; then
|
||||
export APT_DRY_RUN=1
|
||||
fi
|
||||
base_url="${BASE_URL}/ubuntu"
|
||||
for version in ${UBUNTU_VERSIONS[@]}; do
|
||||
for arch in "amd64" "i386" "armhf" "arm64"; do
|
||||
apt-download-binary ${base_url} "$version" "stable" "$arch" "${UBUNTU_PATH}" || true
|
||||
done
|
||||
done
|
||||
echo "Ubuntu finished"
|
||||
|
||||
base_url="${BASE_URL}/debian"
|
||||
for version in ${DEBIAN_VERSIONS[@]}; do
|
||||
for arch in "amd64" "i386" "armhf" "arm64"; do
|
||||
apt-download-binary ${base_url} "$version" "stable" "$arch" "${DEBIAN_PATH}" || true
|
||||
done
|
||||
done
|
||||
"$apt_sync" "${BASE_URL}/ubuntu" @ubuntu-lts stable amd64,i386,armhf,arm64 "$UBUNTU_PATH"
|
||||
echo "Ubuntu finished"
|
||||
"$apt_sync" "${BASE_URL}/debian" @debian-current stable amd64,i386,armhf,arm64 "$DEBIAN_PATH"
|
||||
echo "Debian finished"
|
||||
|
||||
|
||||
|
34
termux.sh
34
termux.sh
@ -2,35 +2,17 @@
|
||||
set -e
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
. ${_here}/helpers/apt-download
|
||||
[ -z "${LOADED_APT_DOWNLOAD}" ] && (echo "failed to load apt-download"; exit 1)
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
WORKING_DIR="${TUNASYNC_WORKING_DIR}"
|
||||
|
||||
ARCHES=("aarch64" "all" "arm" "i686" "x86_64")
|
||||
ARCH_LIST="aarch64,all,arm,i686,x86_64"
|
||||
|
||||
function sync_one_repo() {
|
||||
base_url="$1"
|
||||
BASE_PATH="$2"
|
||||
suite="$3"
|
||||
component="$4"
|
||||
[[ ! -d "$BASE_PATH" ]] && mkdir -p "$BASE_PATH"
|
||||
remote_filelist="${BASE_PATH}/filelist"
|
||||
[[ -f $remote_filelist ]] && rm $remote_filelist
|
||||
|
||||
for arch in ${ARCHES[@]}; do
|
||||
echo "start syncing: $base_url ${arch}"
|
||||
apt-download-binary "${base_url}" "$suite" "$component" "${arch}" "${BASE_PATH}" ${remote_filelist} || true
|
||||
done
|
||||
|
||||
apt-delete-old-debs ${BASE_PATH} $remote_filelist
|
||||
}
|
||||
|
||||
sync_one_repo "https://dl.bintray.com/termux/termux-packages-24" "${WORKING_DIR}/termux-packages-24" stable main
|
||||
sync_one_repo "https://dl.bintray.com/xeffyr/unstable-packages" "${WORKING_DIR}/unstable-packages" unstable main
|
||||
sync_one_repo "https://dl.bintray.com/xeffyr/x11-packages" "${WORKING_DIR}/x11-packages" x11 main
|
||||
sync_one_repo "https://dl.bintray.com/grimler/science-packages-24" "${WORKING_DIR}/science-packages-24" science stable
|
||||
sync_one_repo "https://dl.bintray.com/grimler/game-packages-24" "${WORKING_DIR}/game-packages-24" games stable
|
||||
sync_one_repo "https://dl.bintray.com/grimler/termux-root-packages-24" "${WORKING_DIR}/termux-root-packages-24" root stable
|
||||
"$apt_sync" --delete "https://dl.bintray.com/termux/termux-packages-24" stable main $ARCH_LIST "${WORKING_DIR}/termux-packages-24"
|
||||
"$apt_sync" --delete "https://dl.bintray.com/xeffyr/unstable-packages" unstable main $ARCH_LIST "${WORKING_DIR}/unstable-packages"
|
||||
"$apt_sync" --delete "https://dl.bintray.com/xeffyr/x11-packages" x11 main $ARCH_LIST "${WORKING_DIR}/x11-packages"
|
||||
"$apt_sync" --delete "https://dl.bintray.com/grimler/science-packages-24" science stable $ARCH_LIST "${WORKING_DIR}/science-packages-24"
|
||||
"$apt_sync" --delete "https://dl.bintray.com/grimler/game-packages-24" games stable $ARCH_LIST "${WORKING_DIR}/game-packages-24"
|
||||
"$apt_sync" --delete "https://dl.bintray.com/grimler/termux-root-packages-24" root stable $ARCH_LIST "${WORKING_DIR}/termux-root-packages-24"
|
||||
|
||||
echo "finished"
|
||||
|
Loading…
x
Reference in New Issue
Block a user