代码拉取完成,页面将自动刷新
#!/usr/bin/bash
#rm -rf qemu-compiler/compile_qemu.c ; cp compile_qemu.c qemu-compiler
cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
sudo apt update
if [[ "$(arch)"="x86_64" ]];then
sudo apt install gcc gcc-aarch64-linux-gnu build-essential -y
elif [[ "$(arch)"="aarch64" ]];then
sudo apt install gcc gcc-x86-64-linux-gnu build-essential -y
fi
mkdir qemu-compiler-arm64 qemu-compiler-x64
time bash -c "aarch64-linux-gnu-gcc -O3 -o qemu-compiler-arm64/qemu-compiler compile_qemu.c -static ;x86_64-linux-gnu-gcc -O3 -o qemu-compiler-x64/qemu-compiler compile_qemu.c -static"
for i in arm64 x64;do
cp LICENSE qemu-compiler-$i
tar -cf qemu-compiler-$i.tar qemu-compiler-$i/*
rm -rf qemu-compiler-$i.tar.gz
gzip qemu-compiler-$i.tar
rm -rf qemu-compiler-$i.tar qemu-compiler-$i
done
#cd qemu-compiler
export COMMIT=$@
if [[ $COMMIT != "" ]];then
git commit -a -m "$@"
git push -u origin main
else
echo "未添加提交信息,默认不会提交到git存储库"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。