From 02db83ef5fbead751f7482c033504c20c0107386 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 26 Nov 2020 11:05:02 +0530 Subject: [PATCH] Fix deleting extensions --- src/scripts/darwin.sh | 2 +- src/scripts/linux.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 80f2e642..83d3267c 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -19,7 +19,7 @@ add_log() { # Function to remove extensions remove_extension() { extension=$1 - sudo sed -i '' "/$extension/d" "$ini_file" + sudo sed -Ei '' "/=(.*\/)?\"?$extension/d" "$ini_file" sudo rm -rf "$scan_dir"/*"$extension"* >/dev/null 2>&1 sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1 } diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 15b78805..7cb6ca83 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -78,8 +78,8 @@ check_extension() { # Function to delete extensions delete_extension() { extension=$1 - sudo sed -i "/$extension/d" "$ini_file" - sudo sed -i "/$extension/d" "$pecl_file" + sudo sed -Ei "/=(.*\/)?\"?$extension/d" "$ini_file" + sudo sed -Ei "/=(.*\/)?\"?$extension/d" "$pecl_file" sudo rm -rf "$scan_dir"/*"$extension"* >/dev/null 2>&1 sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1 }