0 Star 0 Fork 5

Meng5in/xunlei

forked from gngpp/xunlei 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.sh 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
gngpp 提交于 2023-09-17 02:49 . Update build
#!/bin/bash
set -e
[ ! -d uploads ] && mkdir uploads
[ ! -d bin ] && mkdir bin
root=$(pwd)
target_list=(x86_64-unknown-linux-musl aarch64-unknown-linux-musl)
for target in ${target_list[@]}; do
if [[ $target == *"aarch64"* ]]; then
arch=aarch64 bash +x unpack.sh
else
bash +x unpack.sh
fi
# default feature
cargo zigbuild --release --target=$target
upx --lzma target/$target/release/xunlei
cargo deb --target=$target --no-build --no-strip
cd target/$target/release
tar czvf xunlei-$tag-$target.tar.gz xunlei
shasum -a 256 xunlei-$tag-$target.tar.gz >xunlei-$tag-$target.tar.gz.sha256
mv xunlei-$tag-$target.tar.gz $root/uploads/
mv xunlei-$tag-$target.tar.gz.sha256 $root/uploads/
cd -
cd target/$target/debian
rename 's/.*/xunlei-'$tag'-'$target'.deb/' *.deb
mv ./* $root/uploads/
cd -
# launcher feature
mkdir -p xunlei-launcher-$tag-$target/bin
mv bin/* xunlei-launcher-$tag-$target/bin/
cargo zigbuild --release --target=$target --no-default-features --features launcher
upx --lzma target/$target/release/xunlei
mv target/$target/release/xunlei xunlei-launcher-$tag-$target/
tar -czvf xunlei-launcher-$tag-$target.tar.gz xunlei-launcher-$tag-$target/*
shasum -a 256 xunlei-launcher-$tag-$target.tar.gz >xunlei-launcher-$tag-$target.tar.gz.sha256
mv xunlei-launcher-$tag-$target.tar.gz uploads/
mv xunlei-launcher-$tag-$target.tar.gz.sha256 uploads/
rm -rf xunlei-launcher-$tag-$target
ls -lah uploads
done
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Rust
1
https://gitee.com/Meng5in/xunlei.git
git@gitee.com:Meng5in/xunlei.git
Meng5in
xunlei
xunlei
main

搜索帮助