diff --git a/init.sh b/init.sh index e0412be..175b3e3 100755 --- a/init.sh +++ b/init.sh @@ -26,6 +26,13 @@ choose_sites(){ DOCKER_PGP=https://mirrors.cernet.edu.cn/docker-ce/linux/debian/gpg PVE_URL=https://mirrors.cernet.edu.cn/proxmox/debian/pve ;; + 2) + MIRROR_URL=https://mirrors.aliyun.com/debian/ + SEC_URL=https://mirrors.aliyun.com/debian-security + DOCKER_URL=https://mirrors.aliyun.com/docker-ce/linux/debian + DOCKER_PGP=https://mirrors.aliyun.com/docker-ce/linux/debian/gpg + PVE_URL=https://mirrors.cernet.edu.cn/proxmox/debian/pve + ;; *) MIRROR_URL=https://deb.debian.org/debian/ SEC_URL=https://security.debian.org/debian-security @@ -99,22 +106,22 @@ Architectures: $OS_ARCH fi } -config(){ +setup(){ apt update apt list nala ca-certificates curl gnupg gpg lsb-release git zsh | awk -F'/' '/\// {print $1}' | xargs -r apt install --no-install-recommends -y set_pkg_source apt update - $AWD/configure.sh } usage(){ echo "Usage: $0 [OPTIONS]"; echo "OPTIONS:"; echo " -f package list file (default: $PKG_BASE)"; - echo " -c config only"; + echo " -s setup only"; echo " -m apt mirror source"; echo " * official" echo " 1 cernet (default)" + echo " 2 aliyun" } PKG_BASE="$AWD/packages-base" @@ -125,7 +132,7 @@ while getopts ":f:cm:" OPT; do f) PKG_BASE=$OPTARG; ;; - c) + s) DO_INSTALL=false; ;; m) @@ -138,7 +145,8 @@ while getopts ":f:cm:" OPT; do esac; done; -config +setup if $DO_INSTALL; then + $AWD/configure.sh $AWD/install.sh $PKG_BASE fi \ No newline at end of file