mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-10 23:41:27 +00:00
修改base64加密工具,修改versioncmp方式
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
apps/mixbox/bin/base64_linux_arm
Executable file
BIN
apps/mixbox/bin/base64_linux_arm
Executable file
Binary file not shown.
BIN
apps/mixbox/bin/base64_linux_mips
Executable file
BIN
apps/mixbox/bin/base64_linux_mips
Executable file
Binary file not shown.
BIN
apps/mixbox/bin/base64_linux_x86_64
Executable file
BIN
apps/mixbox/bin/base64_linux_x86_64
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,4 +4,4 @@ needver=""
|
|||||||
supports="linux_arm,linux_mips,linux_x86_64"
|
supports="linux_arm,linux_mips,linux_x86_64"
|
||||||
appinfo="一款支持多平台,多架构的Shell工具箱"
|
appinfo="一款支持多平台,多架构的Shell工具箱"
|
||||||
newinfo="修复mixbox命令错误"
|
newinfo="修复mixbox命令错误"
|
||||||
version="0.1.9.5"
|
version="0.1.9.6"
|
||||||
|
|||||||
@@ -40,11 +40,7 @@ base_encode() {
|
|||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
echo -n ""
|
echo -n ""
|
||||||
else
|
else
|
||||||
if base64-encode &> /dev/null; then
|
echo -n "$*" | base64
|
||||||
echo -n "$*" | base64-encode
|
|
||||||
else
|
|
||||||
echo -n "$*" | baseutil --b64
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,26 +48,22 @@ base_decode() {
|
|||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
echo -n ""
|
echo -n ""
|
||||||
else
|
else
|
||||||
if base64-decode &> /dev/null; then
|
echo -n "$*" | base64 -d
|
||||||
echo -n "$*" | base64-decode
|
|
||||||
else
|
|
||||||
echo -n "$*" | baseutil --b64 -d
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 > $2 => -1
|
# $1 > $2 => -1
|
||||||
# $1 < $2 => 1
|
# $1 < $2 => 1
|
||||||
# $1 = $2 => 0
|
# $1 = $2 => 0
|
||||||
# versioncmp() {
|
versioncmp() {
|
||||||
|
|
||||||
# [ "$1" = "$2" ] && echo -n "0" && return
|
[ "$1" = "$2" ] && echo -n "0" && return
|
||||||
|
|
||||||
# if test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; then
|
if test "$(echo "$@" | tr " " "\n" | sort | head -n 1)" != "$1"; then
|
||||||
# echo -n "-1"
|
echo -n "-1"
|
||||||
# else
|
else
|
||||||
# echo -n "1"
|
echo -n "1"
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
# }
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user