修复base_encode,base_decode

This commit is contained in:
monlor
2020-03-05 13:50:05 +08:00
parent de4e27bb5c
commit 9244a96773
6 changed files with 5 additions and 4 deletions

View File

@@ -181,6 +181,7 @@ mixbox help
#### 注意事项 #### 注意事项
* 插件名必须为小写,插件服务名一般为驼峰的写法 * 插件名必须为小写,插件服务名一般为驼峰的写法
* 插件二进制名称建议与插件名对应二进制名不能出现下划线建议用横杠如obfs-local
* 执行完插件生成脚本后插件会生成在apps中注意名称不能与现有插件重复 * 执行完插件生成脚本后插件会生成在apps中注意名称不能与现有插件重复
* `gitsync.sh`是打包插件的脚本,-v为更新版本号`可无`打包的插件生成在appstore下 * `gitsync.sh`是打包插件的脚本,-v为更新版本号`可无`打包的插件生成在appstore下

View File

@@ -40,8 +40,8 @@ base_encode() {
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
echo -n "" echo -n ""
else else
if command -v base64_encode &> /dev/null; then if command -v base64-encode &> /dev/null; then
echo -n "$*" | base64_encode echo -n "$*" | base64-encode
else else
echo -n "$*" | baseutil --b64 echo -n "$*" | baseutil --b64
fi fi
@@ -52,8 +52,8 @@ base_decode() {
if [ -z "${1}" ]; then if [ -z "${1}" ]; then
echo -n "" echo -n ""
else else
if command -v base64_decode &> /dev/null; then if command -v base64-decode &> /dev/null; then
echo -n "$*" | base64_decode echo -n "$*" | base64-decode
else else
echo -n "$*" | baseutil --b64 -d echo -n "$*" | baseutil --b64 -d
fi fi