镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-07 06:56:47 +00:00
add shell scripts for non-rsync repo
这个提交包含在:
8
scripts/android.sh
可执行文件
8
scripts/android.sh
可执行文件
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
function sync_android() {
|
||||
cd $TUNASYNC_WORKING_DIR
|
||||
/usr/local/bin/android-repo sync
|
||||
}
|
||||
|
||||
sync_android
|
||||
11
scripts/gen_debian_exclude.py
普通文件
11
scripts/gen_debian_exclude.py
普通文件
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
ARCH_EXCLUDE = ['armel', 'arm64', 'alpha', 'hurd-i386', 'ia64', 'kfreebsd-amd64', 'kfreebsd-i386', 'mips', 'powerpc', 'ppc64el', 's390', 's390x', 'sparc']
|
||||
|
||||
CONTENT_EXCLUDE = ['binary-{arch}', 'installer-{arch}', 'Contents-{arch}.gz', 'Contents-udeb-{arch}.gz', 'Contents-{arch}.diff', 'arch-{arch}.files', 'arch-{arch}.list.gz', '*_{arch}.deb', '*_{arch}.udeb', '*_{arch}.changes']
|
||||
|
||||
with open("debian-exclude.txt", 'wb') as f:
|
||||
for arch in ARCH_EXCLUDE:
|
||||
for content in CONTENT_EXCLUDE:
|
||||
f.write(content.format(arch=arch))
|
||||
f.write('\n')
|
||||
12
scripts/homebrew.sh
可执行文件
12
scripts/homebrew.sh
可执行文件
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
if [ ! -d "$TUNASYNC_WORKING_DIR" ]; then
|
||||
echo "Directory not exists, fail"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function update_homebrew_git() {
|
||||
cd $TUNASYNC_WORKING_DIR
|
||||
git remote -v update
|
||||
}
|
||||
|
||||
update_homebrew_git
|
||||
12
scripts/linux.sh
可执行文件
12
scripts/linux.sh
可执行文件
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
if [ ! -d "$TUNASYNC_WORKING_DIR" ]; then
|
||||
echo "Directory not exists, fail"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function update_linux_git() {
|
||||
cd $TUNASYNC_WORKING_DIR
|
||||
git remote -v update
|
||||
}
|
||||
|
||||
update_linux_git
|
||||
7
scripts/pypi.sh
可执行文件
7
scripts/pypi.sh
可执行文件
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
if [ ! -d "$TUNASYNC_WORKING_DIR" ]; then
|
||||
echo "Directory not exists, fail"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/usr/bin/timeout -s INT 3600 /home/tuna/.virtualenvs/bandersnatch/bin/bandersnatch -c /etc/bandersnatch.conf mirror || exit 1
|
||||
14
scripts/repo-ck.sh
可执行文件
14
scripts/repo-ck.sh
可执行文件
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
function sync_repo_ck() {
|
||||
repo_url="$1"
|
||||
repo_dir="$2"
|
||||
|
||||
[ ! -d "$repo_dir" ] && mkdir -p "$repo_dir"
|
||||
cd $repo_dir
|
||||
lftp "${repo_url}/" -e 'mirror -v -P 5 --delete --only-missing --only-newer --no-recursion; bye'
|
||||
wget "${repo_url}/repo-ck.db" -O "repo-ck.db"
|
||||
}
|
||||
|
||||
sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/x86_64" "${TUNASYNC_WORKING_DIR}/x86_64"
|
||||
sync_repo_ck "${TUNASYNC_UPSTREAM_URL}/i686" "${TUNASYNC_WORKING_DIR}/i686"
|
||||
在新工单中引用
屏蔽一个用户