From 2731f156edd8f850c679552c82e549b50e2aea2d Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Thu, 29 Apr 2010 15:56:46 +0000 Subject: [PATCH] Added support for case-insensitive recognition of package names. Fixes #5854. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36534 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- data/bin/installoptionalpackage | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data/bin/installoptionalpackage b/data/bin/installoptionalpackage index b42a8f43fa..64af529332 100755 --- a/data/bin/installoptionalpackage +++ b/data/bin/installoptionalpackage @@ -393,7 +393,7 @@ function ReadPackageNamesIntoMemory() # read list into associative array while read line ; do local pkg=`echo ${line} | awk '{print $1}'` - local pkgDeps=${line/':'/} + local pkgDeps=${line/"${pkg} :"/} availablePackages[${pkg}]="${pkgDeps}" availablePackagesKeys="${availablePackagesKeys} ${pkg}" done < ${file} @@ -419,8 +419,9 @@ function GeneratePackageNames() nonRepeatingDeps="" GetPackageDependencies "$pkg" + local lowerCasePkg=`echo ${pkg} | tr '[A-Z]' '[a-z]'` if IsPackageAndDepsOkToInstall ${pkg} ; then - echo "${pkg} : ${nonRepeatingDeps}" >> ${file} + echo "${lowerCasePkg} : ${pkg} ${nonRepeatingDeps}" >> ${file} fi done < ${file}.temp @@ -483,7 +484,8 @@ function BuildListOfRequestedPackages() shift fi while [ $# -gt 0 ]; do - wantsToInstall="${wantsToInstall} $1" + local lowerCase=`echo $1 | tr '[A-Z]' '[a-z]'` + wantsToInstall="${wantsToInstall} $lowerCase" shift done }