Skip to content

Conversation

lazypool
Copy link

主要内容

  • 编写了 Ubuntu、Rocky Linux、Debian、Archlinux 等发行版的一键式换源脚本
  • 可扩展,后续可添加更多其他的 Linux 发行版本
  • 通过 common.sh 根脚本的环境变量定义镜像 url,方便维护。

支持的发行版

  • Ubuntu 24.04、Ubuntu 22.04 & 20.04
  • Arch Linux
  • Debian 11、Debian 12
  • Rocky Linux8、Rocky Linux9

改进方向

  • 继续进行代码规范化
  • 目前代码尚未进行测试,需要测试人员排错
  • 添加其他的发行版

Copy link

vercel bot commented May 11, 2025

@lazypool is attempting to deploy a commit to the lcpu Team on Vercel.

A member of the Team first needs to authorize it.

@HolgerHuo
Copy link
Contributor

./change-source.sh: line 11: syntax error near unexpected token `||'
./change-source.sh: line 11: `			[] &&  || script_path="distros/ubuntu.sh"'

change-source.sh seems to be buggy. How should I invoke the script?

Also, seems that the scripts should be downloaded altogether first. Can we use curl or wget to download the script in the entry script instead of sourcing scripts on local filesystem, so that we can use something like curl -LSsf https://mirrors.lcpu.dev/apply | bash

@lazypool
Copy link
Author

New Commit (2025.5.16)

  • 使用 mktemp 来临时下载、存放、解压所需 zip 文件
  • 将 common.sh 直接写进 change-source.sh
  • distros 下的各个子脚本不再 source common.sh
  • 创建了 distros.zip 文件,收录目前实现的系统换源脚本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants