summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-07-27 17:55:10 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-07-27 17:55:10 (EDT)
commit5c23bd10663f99105ae9aed35c65c5a4cd897fb5 (patch)
tree76582bac47566a3ef4b98ebcb92c0c2cf995b8a1
parent7cabb7d5cf106179a897a0a02feee31e1b0f609a (diff)
hash_name(): Hash src-* with fewer collisions.
-rw-r--r--lib/dir.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dir.sh b/lib/dir.sh
index 32c92fd..b72d786 100644
--- a/lib/dir.sh
+++ b/lib/dir.sh
@@ -24,6 +24,8 @@ hash_name()
if [ "x${name}" != "x${name#lib?}" ]; then
hash="$(printf '%s\n' "${name}" | sed 's/^\(lib.\).*$/\1/')"
+ elif [ "x${name}" != "x${name#src-?}" ]; then
+ hash="$(printf '%s\n' "${name}" | sed 's/^\(src-.\).*$/\1/')"
else
hash="$(printf '%s\n' "${name}" | sed 's/^\(.\).*$/\1/')"
fi