1 Star 0 Fork 12

htpeng/syscare

forked from src-openEuler/syscare 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
generate_package.sh 918 Bytes
一键复制 编辑 原始数据 按行查看 历史
宁宇 提交于 2024-03-28 18:24 . update to 1.2.1
#!/bin/bash -e
readonly REPO_NAME="syscare"
readonly REPO_PROVIDER="openeuler"
readonly REPO_URL="https://gitee.com/$REPO_PROVIDER/$REPO_NAME"
readonly REPO_BRANCH="openEuler-22.03"
echo "Cloning source code..."
repo_version=$(grep "Version" "$REPO_NAME.spec" | head -n 1 | awk -F ' ' '{print $NF}')
repo_dir="$REPO_NAME-$repo_version"
rm -rf "$REPO_NAME" "$repo_dir"
git clone "$REPO_URL"
echo "Prepare build requirements..."
pushd "$REPO_NAME"
echo "Checking out dest branch..."
git checkout "$REPO_BRANCH"
echo "Vendoring dependencies..."
cargo vendor --respect-source-config --sync Cargo.toml
mkdir -p .cargo
cat << EOF > .cargo/config.toml
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
popd
echo "Compressing package..."
mv "$REPO_NAME" "$repo_dir"
tar -czf "$repo_dir.tar.gz" "$repo_dir"
echo "Cleaning up..."
rm -rf "$repo_dir"
echo "Done"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/htpeng/syscare.git
[email protected]:htpeng/syscare.git
htpeng
syscare
syscare
master

搜索帮助