You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
655 B
29 lines
655 B
#!/bin/bash
|
|
|
|
|
|
# 定义文件路径
|
|
file="appsrc/appconfig/basic/zappversion.hpp"
|
|
# 提取 VERSION 字符串,处理多个空格的情况
|
|
VERSION=$(grep -oP '#define VERSION\s*"\s*(\S+)\s*"' "$file" | sed 's/#define VERSION\s*"//;s/"//')
|
|
# 输出 VERSION
|
|
echo "VERSION: $VERSION"
|
|
./
|
|
./build.sh
|
|
aarch64-linux-gnu-strip ./build/app/*
|
|
packetname=app-v$VERSION-aarm64
|
|
packetpath=/tmp/$packetname
|
|
|
|
|
|
rm -rf $packetpath
|
|
mkdir -p $packetpath/
|
|
|
|
cp ./build/app/* $packetpath/
|
|
cp -rf html $packetpath/
|
|
|
|
tar -czvf $packetpath.tar.gz -C /tmp/ $packetname
|
|
|
|
mkdir -p ./release
|
|
mv $packetpath.tar.gz ./release/
|
|
|
|
echo "Release package is in ./release/$packetname.tar.gz"
|
|
|