From 7203a1c1a090ac707565a8253560009c9b04c097 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 9 Mar 2016 23:34:41 +0800 Subject: [PATCH] fix compatible, 'sed -i' is not supported be freeBSD --- le.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/le.sh b/le.sh index ac97530..95bb541 100755 --- a/le.sh +++ b/le.sh @@ -1274,7 +1274,8 @@ uninstall() { _profile="$(_detect_profile)" if [ "$_profile" ] ; then - sed -i /le.env/d "$_profile" + text="$(cat $_profile)" + echo "$text" | sed "s|^source.*le.env.*$||" > "$_profile" fi rm -f $LE_WORKING_DIR/le.sh