代码拉取完成,页面将自动刷新
#!/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="linuxqq"
APP_NAME="QQ NT"
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="QQ Linux官方版,从 https://packages.wcbing.top/deb/ 自动维护,感谢 @wcbing 的软件仓库\n\n对应的维护脚本:https://github.com/wcbing/wcbing-apt-repo/blob/main/get/linuxqq.py " # This should be written as json format
MAINTAINER="shenmo<shenmo@spark-app.store>"
HOMEPAGE="https://im.qq.com/linuxqq/index.shtml"
################################# 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_QQ="x64"
elif [ "$1" = "arm64" ] || [ "$1" = "arm" ];then
ARCH="arm64"
ARCH_ANOTHERWAY="-aarch64"
ARCH_FOR_QQ="arm"
elif [ "$1" = "loong64" ];then
ARCH="loong64"
ARCH_ANOTHERWAY="-loong64"
ARCH_FOR_QQ="loongarch"
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
PKG_VER_UPSTREAM=$(dpkg --field ./QQ.deb version)
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
echo "PKG_VER_APTSS=${PKG_VER_APTSS} PKG_VER_UPSTREAM=${PKG_VER_UPSTREAM}"
if dpkg --compare-versions "${PKG_VER_APTSS}" "<<" "${PKG_VER_UPSTREAM}";then
VERSION=${PKG_VER_UPSTREAM}
else
rm -vf ./QQ.deb
log.info "No need to upgrade, exit"
exit
fi
if [ -e $VERSION ];then
log.error "VERSION is empty. This should not happen! exit."
fi
if [ "${ARCH}" = "loong64" ];then
./repack-loongarch-to-loong.sh ./QQ.deb
#https://gitee.com/amber-ce/ace-host-package-creator/blob/master/repack-loongarch-to-loong.sh
else
mv -v QQ.deb ${PKG_NAME}_${VERSION}_${ARCH}.deb
fi
popd
}
prepare
build
write_json $STORE_APP_PATH
rm -rf $WORKDIR
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。