Browse Source

fix compatible, 'sed -i' is not supported be freeBSD

neil 9 years ago
parent
commit
7203a1c1a0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      le.sh

+ 2 - 1
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