initial commit

This commit is contained in:
2026-03-18 03:29:25 +08:00
commit 146c2c5f35
37 changed files with 1445 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -e
echo "================================="
echo " ArvanCloud Alpine Mirror Setup"
echo "================================="
if [[ ! -f /etc/alpine-release ]]; then
echo "This script only supports Alpine."
exit 1
fi
echo "[1/3] Backing up repositories..."
cp /etc/apk/repositories /etc/apk/repositories.bak
ALPINE_VERSION=$(cut -d'.' -f1,2 /etc/alpine-release)
echo "[2/3] Writing mirror..."
cat > /etc/apk/repositories <<EOF
https://mirror.arvancloud.ir/alpine/v${ALPINE_VERSION}/main
https://mirror.arvancloud.ir/alpine/v${ALPINE_VERSION}/community
EOF
echo "[3/3] Updating package index..."
apk update
echo "Alpine mirror configured."