Permalink
Browse files

Improve the short-name detection for stat'ing a PBI

  • Loading branch information...
1 parent c405e82 commit 0d4cf8f25e391db2084e924025da70b683e42928 @kmoore134 kmoore134 committed Oct 9, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 src-sh/pbi-manager10/pbi-manager
@@ -400,11 +400,13 @@ parse_delete_pbi_cmdline() {
find_pbi_namematch()
{
+ _fLow="`echo ${1} | tr '[:upper:]' '[:lower:]' | sed 's| ||g'`"
PBI_NAMEMATCH=""
for i in `ls -d ${PBI_DBAPPDIR}/* 2>/dev/null`
do
if [ ! -e "$i/pbi_name" ] ; then continue ; fi
- if [ "`cat $i/pbi_name`" = "$1" ] ; then
+ _tLow="`cat $i/pbi_name | tr '[:upper:]' '[:lower:]' | sed 's| ||g'`"
+ if [ "$_tLow" = "$_fLow" ] ; then
PBI_NAMEMATCH="`basename ${i}`"
break
fi

0 comments on commit 0d4cf8f

Please sign in to comment.