2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 13:47:15 +08:00

feat: 添加 checksums 校验

This commit is contained in:
耗子
2023-10-23 21:26:07 +08:00
parent 5ec25deaf6
commit fd0092a299
18 changed files with 318 additions and 65 deletions

View File

@@ -64,8 +64,18 @@ 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
if ! sha256sum --status -c postgresql-${postgresqlVersion}.tar.gz.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
mv postgresql-${postgresqlVersion} src
# 编译