mirror of
https://github.com/lukasbestle/projectr.git
synced 2026-10-11 23:10:19 +02:00
site_unlink/project_remove: Only clear full match
`sed` has previously also removed lines that have only partly matched. Now, only full matches are removed.
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ echo -e " => \033[32mSuccess.\033[0m"
|
||||
|
||||
# Remove from site's domains
|
||||
echo -e "\033[1mRemoving domain from site's domains (\033[34m.domains\033[0;1m file)...\033[0m"
|
||||
sed -i "/${domain//\//\/}/d" "$HOME/web/sites/$site/.domains" # Replace / with \/ because of the sed separators
|
||||
sed -i "/^${domain//\//\/}$/d" "$HOME/web/sites/$site/.domains" # Replace / with \/ because of the sed separators
|
||||
if [[ $? == 0 ]]; then
|
||||
echo -e " => \033[32mSuccess.\033[0m"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user