From 88c4d15c7701978f813ae2d408667bc96035f131 Mon Sep 17 00:00:00 2001 From: Philippe Kueck Date: Fri, 7 Oct 2016 10:55:59 +0200 Subject: [PATCH] that's a one-liner.. --- acme.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/acme.sh b/acme.sh index 848138fc..e65861c3 100755 --- a/acme.sh +++ b/acme.sh @@ -3440,20 +3440,17 @@ uninstall() { _profile="$(_detect_profile)" if [ "$_profile" ] ; then - text="$(cat $_profile)" - echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.env\"$||" > "$_profile" + sed -i "|/$LE_WORKING_DIR/$PROJECT_NAME\.env/d" "$_profile" fi _csh_profile="$HOME/.cshrc" if [ -f "$_csh_profile" ] ; then - text="$(cat $_csh_profile)" - echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_csh_profile" + sed -i "|/$LE_WORKING_DIR/$PROJECT_NAME\.csh/d" "$_csh_profile" fi _tcsh_profile="$HOME/.tcshrc" if [ -f "$_tcsh_profile" ] ; then - text="$(cat $_tcsh_profile)" - echo "$text" | sed "s|^.*\"$LE_WORKING_DIR/$PROJECT_NAME.csh\"$||" > "$_tcsh_profile" + sed -i "|/$LE_WORKING_DIR/$PROJECT_NAME\.csh/d" "$_tcsh_profile" fi rm -f $LE_WORKING_DIR/$PROJECT_ENTRY