Skip to content

Commit

Permalink
优化安装脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Feb 25, 2020
1 parent d9be374 commit 379190b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ installTrojan(){
curl -L "$DOWNLAOD_URL/$LASTEST_VERSION/trojan" -o /usr/local/bin/trojan
chmod +x /usr/local/bin/trojan
#命令补全环境变量
[[ -z $(grep trojan ~/.${SHELL_WAY}rc) ]] && { echo "source <(trojan completion ${SHELL_WAY})" >> ~/.${SHELL_WAY}rc; source ~/.${SHELL_WAY}rc; }
[[ -z $(grep trojan ~/.${SHELL_WAY}rc) ]] && echo "source <(trojan completion ${SHELL_WAY})" >> ~/.${SHELL_WAY}rc
source ~/.${SHELL_WAY}rc
if [[ $UPDATE == 0 ]];then
colorEcho $GREEN "安装trojan管理程序成功!\n"
echo "运行命令`colorEcho $BLUE trojan`可进行trojan管理\n"
Expand All @@ -126,7 +127,7 @@ main(){
[[ ${REMOVE} == 1 ]] && removeTrojan && return
[[ $UPDATE == 0 ]] && echo "正在安装trojan管理程序.." || echo "正在更新trojan管理程序.."
checkSys
installDependent
[[ $UPDATE == 0 ]] && installDependent
installTrojan
}

Expand Down

0 comments on commit 379190b

Please sign in to comment.