2020-03-03

This commit is contained in:
monlor
2020-03-03 14:19:50 +08:00
parent 5f29985e39
commit 698ec0ddc5
2 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ logsh "【Tools】" "请按任意键安装工具箱(Ctrl + C 退出)."
read answer
#check root
# [ "$USER" != "root" ] && logsh "【Tools】" "请使用root用户安装工具箱" && exit 1
mburl="https://monlor.coding.net/p/MIXBOX/d/MIXBOX/git/raw/master"
mburl="https://raw.githubusercontent.com/MIXBOX/master"
mbtmp="/tmp/mbtmp"
[ ! -d "${mbtmp}" ] && mkdir -p ${mbtmp}
model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
path=./
cd $path
[ $? -ne 0 ] && echo "Change directory failed!" && exit
@@ -16,13 +16,13 @@ sedsh() {
[ -z "$1" -o -z "$2" -o -z "$3" ] && echo "null sedsh params!" && exit 1
if [ "$(uname -s)" = "Darwin" ]; then
if [ "$1" = "s" ]; then
sed -i "" "s/$2/$3/g" "$4"
sed -i "" "s#$2#$3#g" "$4"
elif [[ "$1" = "d" ]]; then
sed -i "" "/$2/d" "$3"
fi
else
if [[ "$1" = "s" ]]; then
sed -i "s/$2/$3/g" "$4"
sed -i "s#$2#$3#g" "$4"
elif [[ "$1" = "d" ]]; then
sed -i "/$2/d" "$3"
fi