mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-12-29 09:45:18 +00:00
Update Nlbench_beta.sh
This commit is contained in:
parent
28f70512ef
commit
89082fffa2
@ -32,12 +32,12 @@ update_scripts() {
|
|||||||
echo -e "${BLUE}发现新版本 $REMOTE_VERSION,当前版本 $CURRENT_VERSION${NC}"
|
echo -e "${BLUE}发现新版本 $REMOTE_VERSION,当前版本 $CURRENT_VERSION${NC}"
|
||||||
echo -e "${BLUE}正在更新...${NC}"
|
echo -e "${BLUE}正在更新...${NC}"
|
||||||
|
|
||||||
if curl -s -o /tmp/Nlbench.sh $SCRIPT_URL; then
|
if curl -s -o /tmp/NLbench_beta.sh $SCRIPT_URL; then
|
||||||
NEW_VERSION=$(grep '^CURRENT_VERSION=' /tmp/Nlbench.sh | cut -d'"' -f2)
|
NEW_VERSION=$(grep '^CURRENT_VERSION=' /tmp/NLbench_beta.sh | cut -d'"' -f2)
|
||||||
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
|
if [ "$NEW_VERSION" != "$CURRENT_VERSION" ]; then
|
||||||
sed -i "s/^CURRENT_VERSION=.*/CURRENT_VERSION=\"$NEW_VERSION\"/" "$0"
|
sed -i "s/^CURRENT_VERSION=.*/CURRENT_VERSION=\"$NEW_VERSION\"/" "$0"
|
||||||
|
|
||||||
if mv /tmp/Nlbench.sh "$0"; then
|
if mv /tmp/NLbench_beta.sh "$0"; then
|
||||||
chmod +x "$0"
|
chmod +x "$0"
|
||||||
echo -e "${GREEN}脚本更新成功!新版本: $NEW_VERSION${NC}"
|
echo -e "${GREEN}脚本更新成功!新版本: $NEW_VERSION${NC}"
|
||||||
echo -e "${YELLOW}正在重新启动脚本以应用更新...${NC}"
|
echo -e "${YELLOW}正在重新启动脚本以应用更新...${NC}"
|
||||||
|
Loading…
Reference in New Issue
Block a user