# 阿里云 24.04 deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.bak sudo sed -i "s@http://.*archive.ubuntu.com@http://mirrors.aliyun.com@g" /etc/apt/sources.list sudo sed -i "s@http://.*security.ubuntu.com@http://mirrors.aliyun.com@g" /etc/apt/sources.list # 华为云(公共) sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i "s@http://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list sudo sed -i "s@http://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list
sudo nmcli connection show # 示例 NAME UUID TYPE DEVICE ens160 efa9002e-e3d0-3b51-ace5-70a172aade97 ethernet ens160 lo 48b9bbc4-117d-4ff4-83d7-020884162259 loopback lo
if [[ $? -ne 0 ]]; then log_info "Failed to install vim-plug and will copy it." if [[ ! -f ~/.vim/autoload/plug.vim ]]; then mkdir -p ~/.vim/autoload cp $CUR_DIR/vimconfig/plug.vim ~/.vim/autoload/plug.vim fi fi
install_vim_plugin vim +LeaderfInstallCExtension log_info "Vim configured." }
function dos_2_unix() { find $CUR_DIR -type f | xargs -I {} dos2unix {} log_info "Converted dos to unix." }
function main() { dos_2_unix install_tools config_vim } main