commit 93b26a94aae71c8138945ab8bb4c0b59d59c9a7e
parent aba8275a08950bd6d260dfe6dc6c0a928bef8d85
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Mon, 4 Nov 2019 13:23:03 -0500
conf: betterer link name matching
Former-commit-id: 8b03e33bebef7d6b377c8f26340a9b0c9fea4b31
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/conf b/scripts/conf
@@ -103,7 +103,7 @@ unlink_all() {
done
}
link_specific() {
- grep_result="$( ( IFS=$'\n'; echo "${!mappings[*]}" ) | grep "$1")"
+ grep_result="$( ( IFS=$'\n'; echo "${!mappings[*]}" ) | grep "^$1")"
if [ -n "$grep_result" ]; then
for f in "${!mappings[@]}"; do
if [[ "${f%%/*}" == "$1" ]] || [ "${f}" = "$1" ]; then
@@ -125,7 +125,7 @@ do_unlink() {
fi
}
unlink_specific(){
- grep_result="$( ( IFS=$'\n'; echo "${!mappings[*]}" ) | grep "$1")"
+ grep_result="$( ( IFS=$'\n'; echo "${!mappings[*]}" ) | grep "^$1")"
if [ -n "$grep_result" ]; then
for f in "${!mappings[@]}"; do
if [[ "${f}" == "${i}"* ]]; then