1 Star 0 Fork 0

星火构建服务 Spark Building Service/bytedance-feishu-stable

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.sh 3.30 KB
一键复制 编辑 原始数据 按行查看 历史
shenmo 提交于 2024-11-22 00:36 +08:00 . update build.sh.
#!/bin/bash
# Special thank to Shiroko, he give me the insight of coding in proper way
################################# Here we import our tools
################################# Here we set the configs
REALPATH=`realpath $0`
HERE_PATH=`dirname $REALPATH`
STORE_APP_PATH="$HERE_PATH"
WORKDIR=`mktemp -d`
ARCH="" # Define it later
ARCH_ANOTHERWAY="" # Define it later
PKG_NAME="bytedance-feishu-stable"
APP_NAME="飞书(Linux)"
#SOURCE_LIST_FILE="/etc/apt/sources.list.d/wcbing.list"
GITHUB_REPO=""
VERSION="" #Here we use other way to get version so do not write here
TAGS="ubuntu;deepin;uos"
CATAGORY="chat" #https://gitee.com/deepin-community-store/spark-store/blob/dev/DOCS/spk-doc.md
DETAIL="飞书整合即时消息、日历、音视频会议、云文档、工作台等功能于一体,成就团队和个人,更高效、更愉悦。" # This should be written as json format
MAINTAINER="shenmo<shenmo@spark-app.store>"
HOMEPAGE="https://www.feishu.cn/"
################################# Fill the variables below only if you use write_control function
SECTION=""
PRIORITY=""
DEPENDS=""
DESCRIPTION_SHORT=""
DESCRIPTION_LONG=""
PROVIDES=""
REPLACES=""
RECOMMENDS=""
source /opt/bashimport/sbs-utils.bashimport
source /opt/bashimport/sbs-build-helper.bashimport
if [ "$1" = "amd64" ] || [ "$1" = "x64" ];then
ARCH="amd64"
ARCH_ANOTHERWAY="-amd64"
ARCH_FOR_LOONG="amd64"
PLATFORM_NUM="10"
elif [ "$1" = "arm64" ] || [ "$1" = "arm" ];then
ARCH="arm64"
ARCH_ANOTHERWAY="-aarch64"
ARCH_FOR_LOONG="arm64"
PLATFORM_NUM="12"
elif [ "$1" = "loong64" ];then
ARCH="loong64"
ARCH_ANOTHERWAY="-loong64"
ARCH_FOR_LOONG="loongarch64"
else
log.error "Err:Invalid Architecture"
exit 1
fi
function prepare(){
aptss_get_update
}
function build(){
pushd $STORE_APP_PATH
#curl -fs https://im.qq.com/rainbow/linuxQQDownload | sed -nE 's/.*var params\s?=\s?(\{.*\});.*/\1/p' | jq -r '.version, .x64DownloadUrl.deb, .armDownloadUrl.deb, .loongarchDownloadUrl.deb'
#download_list="$(curl -fs https://im.qq.com/rainbow/linuxQQDownload | sed -nE 's/.*var params\s?=\s?(\{.*\});.*/\1/p')"
#wget $(echo $download_list | jq -r ".${ARCH_FOR_QQ}DownloadUrl.deb") -O QQ.deb
JSON=$(curl -s "https://www.feishu.cn/api/package_info?platform=${PLATFORM_NUM}")
PKG_VER_UPSTREAM=$(echo $JSON | jq -r ".data.version_number" | cut -d 'V' -f 2)
download_link="$(echo $JSON | jq -r ".data.download_link")"
PKG_VER_APTSS=`get_version_from_source_list_file ${PKG_NAME}:${ARCH} /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore${ARCH_ANOTHERWAY}.list`
#PKG_VER_UPSTREAM=`get_version_from_source_list_file ${PKG_NAME}:${ARCH} ${SOURCE_LIST_FILE}`
#PKG_VER_UPSTREAM=$(echo "$download_list" | jq -r '.version')
compare_version ${PKG_VER_APTSS} ${PKG_VER_UPSTREAM}
# Compare version will also give the value to $VERSION
# Now we should have the $VERSION
if [ -e $VERSION ];then
log.error "VERSION is empty. This should not happen! exit."
fi
aria2c "${download_link}" -o TEMP.deb
VERSION=$(dpkg --field ./TEMP.deb version)
if [ "${ARCH}" = "loong64" ];then
./repack-loongarch-to-loong.sh ./TEMP.deb
#https://gitee.com/amber-ce/ace-host-package-creator/blob/master/repack-loongarch-to-loong.sh
else
mv -v ./TEMP.deb ${PKG_NAME}_${VERSION}_${ARCH}.deb
fi
popd
}
prepare
build
write_json $STORE_APP_PATH
rm -rf $WORKDIR
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/spark-building-service/bytedance-feishu-stable.git
git@gitee.com:spark-building-service/bytedance-feishu-stable.git
spark-building-service
bytedance-feishu-stable
bytedance-feishu-stable
master

搜索帮助