~继续拆分脚本

This commit is contained in:
juewuy
2025-12-24 11:09:28 +08:00
parent 1a4330cb86
commit e62f485df4
16 changed files with 315 additions and 320 deletions

10
scripts/libs/compare.sh Normal file
View File

@@ -0,0 +1,10 @@
compare() { #对比文件
if [ ! -f "$1" ] || [ ! -f "$2" ]; then
return 1
elif ckcmd cmp; then
cmp -s "$1" "$2"
return $?
else
[ "$(cat "$1")" = "$(cat "$2")" ] && return 0 || return 1
fi
}