Fix deleting extensions

This commit is contained in:
Shivam Mathur 2020-11-26 11:05:02 +05:30
parent 6728eaf2ad
commit 02db83ef5f
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 3 additions and 3 deletions

View File

@ -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
}

View File

@ -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
}