diff --git a/bin/project_remove b/bin/project_remove index 4e75dbe..34e49b0 100755 --- a/bin/project_remove +++ b/bin/project_remove @@ -43,7 +43,7 @@ fi # Remove from the projects file echo -e "\033[1mRemoving project from \033[34m$projectsFile\033[0;1m...\033[0m" realpath="$(readlink -f "$project")" -if ! sed -i "/${realpath//\//\/}/d" "$projectsFile"; then # Replace / with \/ because of the sed separators +if ! sed -i "/^${realpath//\//\/}$/d" "$projectsFile"; then # Replace / with \/ because of the sed separators echo -e " => \033[31mSomething went wrong.\033[0m" >&2 exit 1 fi diff --git a/bin/site_unlink b/bin/site_unlink index 28167f6..34a4548 100755 --- a/bin/site_unlink +++ b/bin/site_unlink @@ -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