修复mac和linux兼容性

This commit is contained in:
whyour
2022-06-26 18:59:39 +08:00
parent 28ea160004
commit e85742a293
5 changed files with 95 additions and 21 deletions
+1 -1
View File
@@ -538,7 +538,7 @@ main() {
;;
esac
local end_time=$(date '+%Y-%m-%d %H:%M:%S')
local diff_time=$(($(date +%s -d "$end_time") - $(date +%s -d "$begin_time")))
local diff_time=$(diff_time "%Y-%m-%d %H:%M:%S" "$begin_time" "$end_time")
if [[ $p1 != "repo" ]] && [[ $p1 != "raw" ]]; then
echo -e "\n## 执行结束... $end_time 耗时 $diff_time" >>$log_path
cat $log_path