2022-03-10 23:22:12 +08:00
#!/bin/bash
#
2024-02-29 21:35:12 +08:00
# Copyright (c) 2019 Of Him Code Technology Studio
2024-02-29 14:10:24 +08:00
# Jpom is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
2022-03-10 23:22:12 +08:00
#
# 版本
2023-03-21 20:24:53 +08:00
jpom_version = $1
jpom_tag = $2
2022-03-10 23:22:12 +08:00
2022-06-18 23:58:08 +08:00
#Mirror_Host=download.fastgit.org
#Mirror_Host=hub.fastgit.xyz
2022-12-22 10:38:15 +08:00
#Mirror_Host=github.com
2022-06-18 23:58:08 +08:00
2022-03-10 23:22:12 +08:00
function checkItem( )
{
rm -f $1 -${ jpom_version } -release.$2 .sha1 $1 -${ jpom_version } -release.$2
2023-03-21 20:24:53 +08:00
curl -LfsSo $1 -${ jpom_version } -release.$2 .sha1 https://download.jpom.top/${ jpom_tag } /${ jpom_version } /$1 -${ jpom_version } -release.$2 .sha1
2022-03-10 23:22:12 +08:00
ESUM = ` cat $1 -${ jpom_version } -release.$2 .sha1`
echo " $1 - ${ jpom_version } -release. $2 => ${ ESUM } "
2023-03-21 20:24:53 +08:00
curl -LfsSo $1 -${ jpom_version } -release.$2 https://download.jpom.top/${ jpom_tag } /${ jpom_version } /$1 -${ jpom_version } -release.$2
2022-03-10 23:22:12 +08:00
echo " ${ ESUM } $1 - ${ jpom_version } -release. $2 " | sha1sum -c -;
rm -f $1 -${ jpom_version } -release.$2 .sha1 $1 -${ jpom_version } -release.$2
}
# check agent
checkItem agent tar.gz
checkItem agent zip
# check server
checkItem server tar.gz
checkItem server zip