~ubuntu-branches/ubuntu/natty/os-prober/natty

« back to all changes in this revision

Viewing changes to common.sh

  • Committer: Bazaar Package Importer
  • Author(s): Frans Pop
  • Date: 2007-02-27 20:16:49 UTC
  • mfrom: (1.1.5 edgy)
  • Revision ID: james.westby@ubuntu.com-20070227201649-dayeca1vogcnuhov
Tags: 1.17
Check for both upper and lowercase filenames when detecting Windows
NT/XP/2000. Thanks to Thanatermesis.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
count_for() {
2
2
  _labelprefix=$1
3
 
  _result=$(grep "^${_labelprefix} " /var/lib/os-prober/labels 2>/dev/null)
 
3
  _result=$(grep "^${_labelprefix} " /var/lib/os-prober/labels 2>/dev/null || true)
4
4
 
5
5
  if [ -z "$_result" ]; then
6
6
    return
39
39
  log "result:" "$@"
40
40
  echo "$@"
41
41
}
 
42
 
 
43
# shim to make it easier to use os-prober outside d-i
 
44
if ! type mapdevfs >/dev/null 2>&1; then
 
45
  mapdevfs () {
 
46
    echo "$1"
 
47
  }
 
48
fi