代码拉取完成,页面将自动刷新
同步操作将从 CN-GuoZiyang/oslab 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
export OSLAB_PATH=$(cd $(dirname "${BASH_SOURCE[0]}") >/dev/null && pwd)
debianSetup() {
sudo dpkg --add-architecture i386
sudo apt update
sudo apt-get install -y binutils
sudo apt-get install -y binutils-common
sudo apt-get install -y build-essential bin86 manpages-dev libc6-dev-i386 zlib1g:i386 libncurses5:i386 libsm-dev:i386 libx11-dev:i386 libxpm-dev:i386 libexpat1:i386
cp $OSLAB_PATH/gcc-3.4-ubuntu.tar.gz /tmp
tar zxvf /tmp/gcc-3.4-ubuntu.tar.gz -C /tmp/
cd /tmp/gcc-3.4
sudo ./inst.sh amd64
cd $OSLAB_PATH
tar zxvf $OSLAB_PATH/linux-0.11.tar.gz -C $OSLAB_PATH
}
archSetup() {
echo "Please make sure you've added the archlinuxcn source!(Y or n)"
read res
if [ $res = "N" -o $res = "n" ]; then
echo "Please add archlinuxcn source first!"
else
sudo pacman -U *.pkg.tar.xz
sudo pacman -S gcc bin86 base-devel lib32-ncurses5-compat-libs
tar zxvf $OSLAB_PATH/linux-0.11.tar.gz -C $OSLAB_PATH
fi
}
if [ $# -lt 1 ]; then
echo "Please add your distro name(debian, archlinux) as the first argument!"
elif [ $1 = "debian" ]; then
debianSetup
elif [ $1 = "archlinux" ]; then
archSetup
else
echo "This distro is not supported!(debian and archlinux is supported at present)"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。