Skip to content

Commit

Permalink
增强检查,避免空参数使用backup.sh时,造成问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
ledccn committed Aug 6, 2020
1 parent 630dc3a commit 11c976d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
# 传入的种子备份参数
if [ $1 ]; then
AppName=$1
else
echo 'AppName not null'
exit 1
fi

if [ $2 ]; then
torrentDir=$2
else
echo 'torrentDir not null'
exit 2
fi

# 脚本当前目录
Expand Down

0 comments on commit 11c976d

Please sign in to comment.