代码拉取完成,页面将自动刷新
同步操作将从 anolis/sysom 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
version=3.1
check_cmd() {
local cmd="$1"
if ! command -v "${cmd}" >/dev/null 2>&1; then
echo >&2 "I require ${cmd} but it's not installed. Aborting."
exit 1
fi
}
green() {
printf '\33[1;32m%b\n\33[0m' "$1"
}
if [ "$UID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
basedir=`dirname $0`
pushd ${basedir}
###nodejs version should >= 16###
check_cmd yarn
check_cmd tar
check_cmd wget
check_cmd rpmbuild
check_cmd /usr/bin/python3
###rpmbuild will call brp-python-bytecompile, need /usr/bin/python
###/usr/lib/rpm/brp-python-bytecompile /usr/bin/python
###sysom run by python3, we should set /usr/bin/python link to /usr/bin/python3
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/bin/python3 /usr/bin/python
rm -rf /root/rpmbuild
mkdir -p /root/rpmbuild/BUILD
mkdir -p /root/rpmbuild/SOURCES
mkdir -p /root/rpmbuild/BUILDROOT
mkdir -p /root/rpmbuild/SPECS
mkdir -p /root/rpmbuild/RPMS
mkdir -p /root/rpmbuild/SRPMS
cp tools/deploy/sysom.spec /root/rpmbuild/SPECS
pushd ..
rm -rf sysom-${version}
rm -f sysom-${version}.tar.gz
cp -a sysom sysom-${version}
tar -zcf sysom-${version}.tar.gz sysom-${version}
cp sysom-${version}.tar.gz /root/rpmbuild/SOURCES/
pushd /root/rpmbuild/SPECS
rpmbuild -ba sysom.spec
rm -f /usr/bin/python
mv /usr/bin/python.bak /usr/bin/python
popd
popd
popd
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。