mirror of
https://gitlab.com/fscarmen/warp.git
synced 2026-06-15 03:25:42 +08:00
fix a runnig time bug
Former-commit-id: af15085d3c8a76bb4d7213af54987d6286c21bec
This commit is contained in:
@@ -34,10 +34,10 @@ E[13]="Update WARP+ account..."
|
||||
C[13]="升级 WARP+ 账户中……"
|
||||
E[14]="The upgrade failed, WARP+ account error or more than 5 devices have been activated. Free WARP account to continu."
|
||||
C[14]="升级失败,WARP+ 账户错误或者已激活超过5台设备,自动更换免费 WARP 账户继续"
|
||||
E[15]="Congratulations! WARP\$TYPE is turned on. Spend time:\$(( end - start )) seconds.\\\n The script runs today: \$TODAY. Total:\$TOTAL"
|
||||
C[15]="恭喜!WARP\$TYPE 已开启,总耗时:\$(( end - start ))秒, 脚本当天运行次数:\$TODAY,累计运行次数:\$TOTAL"
|
||||
E[16]="Congratulations! WARP is turned on. Spend time:\$(( end - start )) seconds.\\\n The script runs on today: \$TODAY. Total:\$TOTAL"
|
||||
C[16]="恭喜!WARP 已开启,总耗时:\$(( end - start ))秒, 脚本当天运行次数:\$TODAY,累计运行次数:\$TOTAL"
|
||||
E[15]="Congratulations! WARP\$TYPE is turned on. Spend time:\$(( end - start )) seconds.\\\n The script runs today: \${TODAY}. Total:\${TOTAL}"
|
||||
C[15]="恭喜!WARP\$TYPE 已开启,总耗时:\$(( end - start ))秒, 脚本当天运行次数:\${TODAY},累计运行次数:\${TOTAL}"
|
||||
E[16]="Congratulations! WARP is turned on. Spend time:\$(( end - start )) seconds.\\\n The script runs on today: \${TODAY}. Total:\${TOTAL}"
|
||||
C[16]="恭喜!WARP 已开启,总耗时:\$(( end - start ))秒, 脚本当天运行次数:\${TODAY},累计运行次数:\${TOTAL}"
|
||||
E[17]="Device name:\$(grep -s 'Device name' /etc/wireguard/info.log | awk '{ print \$NF }')\\\n Quota:\$(grep -s Quota /etc/wireguard/info.log | awk '{ print \$(NF-1), \$NF }')"
|
||||
C[17]="设备名:\$(grep -s 'Device name' /etc/wireguard/info.log | awk '{ print \$NF }')\\\n 剩余流量:\$(grep -s Quota /etc/wireguard/info.log | awk '{ print \$(NF-1), \$NF }')"
|
||||
E[18]="Run again with warp [option], such as"
|
||||
@@ -123,7 +123,7 @@ translate(){ [[ -n "$1" ]] && curl -ksm8 "http://fanyi.youdao.com/translate?&doc
|
||||
# 脚本当天及累计运行次数统计
|
||||
statistics_of_run-times(){
|
||||
COUNT=$(curl -ksm1 "https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fcdn.jsdelivr.net%2Fgh%2Ffscarmen%2Fwarp%2Fmenu.sh&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=&edge_flat=true" 2>&1) &&
|
||||
TODAY=$(expr "$COUNT" : '.*\s\([0-9]\{1,\}\)\s/.*') && TOTAL=$(expr "$COUNT" : '.*/\s\([0-9]\{1,\}\)\s.*')
|
||||
TODAY=$(expr "$COUNT" : '.* \([0-9]\{1,\}\) /.*') && TOTAL=$(expr "$COUNT" : '.*/ \([0-9]\{1,\}\) .*')
|
||||
}
|
||||
|
||||
# 选择语言,先判断 /etc/wireguard/language 里的语言选择,没有的话再让用户选择,默认英语
|
||||
|
||||
Reference in New Issue
Block a user