summaryrefslogtreecommitdiff
path: root/tools/ds-identify
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ds-identify')
-rwxr-xr-xtools/ds-identify9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/ds-identify b/tools/ds-identify
index aff26eb6..74d26537 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -963,10 +963,11 @@ found() {
# do not pass an empty line through.
shift
fi
- # always write the None datasource last.
- if [ "$list" != "None" ]; then
- list="${list:+${list}, }None"
- fi
+ # if None is not already in the list, then add it last.
+ case " $list " in
+ *\ None,\ *|*\ None\ ) :;;
+ *) list=${list:+${list}, None};;
+ esac
write_result "datasource_list: [ $list ]" "$@"
return
}