2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 14:57:16 +08:00

feat: 部分软件使用 7z 格式

This commit is contained in:
耗子
2024-05-15 22:48:17 +08:00
parent 7b29e4546a
commit 06bf1b0604
7 changed files with 55 additions and 43 deletions

View File

@@ -31,9 +31,9 @@ source ${setupPath}/panel/scripts/calculate_j.sh
j=$(calculate_j)
if [[ "${1}" == "15" ]]; then
postgresqlVersion="15.6"
postgresqlVersion="15.7"
elif [[ "${1}" == "16" ]]; then
postgresqlVersion="16.2"
postgresqlVersion="16.3"
else
echo -e $HR
echo "错误:不支持的 PostgreSQL 版本!"
@@ -66,19 +66,19 @@ mkdir -p ${postgresqlPath}
cd ${postgresqlPath}
# 下载源码
wget -T 120 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.tar.gz ${downloadUrl}/postgresql-${postgresqlVersion}.tar.gz
wget -T 20 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.tar.gz.checksum.txt ${downloadUrl}/postgresql-${postgresqlVersion}.tar.gz.checksum.txt
wget -T 120 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.7z ${downloadUrl}/postgresql-${postgresqlVersion}.7z
wget -T 20 -t 3 -O ${postgresqlPath}/postgresql-${postgresqlVersion}.7z.checksum.txt ${downloadUrl}/postgresql-${postgresqlVersion}.7z.checksum.txt
if ! sha256sum --status -c postgresql-${postgresqlVersion}.tar.gz.checksum.txt; then
if ! sha256sum --status -c postgresql-${postgresqlVersion}.7z.checksum.txt; then
echo -e $HR
echo "错误PostgreSQL 源码 checksum 校验失败,文件可能被篡改或不完整,已终止操作"
rm -rf ${postgresqlPath}
exit 1
fi
tar -zxvf postgresql-${postgresqlVersion}.tar.gz
rm -f postgresql-${postgresqlVersion}.tar.gz
rm -f postgresql-${postgresqlVersion}.tar.gz.checksum.txt
7z x postgresql-${postgresqlVersion}.7z
rm -f postgresql-${postgresqlVersion}.7z
rm -f postgresql-${postgresqlVersion}.7z.checksum.txt
mv postgresql-${postgresqlVersion} src
# 编译