~colinb/grub/cdbmain

« back to all changes in this revision

Viewing changes to util/update-grub_lib.in

  • Committer: Colin D Bennett
  • Date: 2008-08-03 03:57:46 UTC
  • mfrom: (820.8.1 trunk-clean)
  • Revision ID: colin@gibibit.com-20080803035746-0zn13x8oznory84l
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
    dir=""
69
69
  fi
70
70
 
71
 
  echo $path | sed -e "s,^$dir,,g"
 
71
  # XXX: This fails if $dir contains ','.
 
72
  path=`echo "$path" | sed -e "s,^$dir,,g"` || return 1
 
73
 
 
74
  case "`uname 2>/dev/null`" in
 
75
    CYGWIN*)
 
76
      # Cygwin: Check if regular or emulated mount.
 
77
      if [ -z "$dir" ] || [ "`stat -c %D "$dir/.."`" != 620000 ] ; then
 
78
        # Reached some mount point not below /cygdrive.
 
79
        # GRUB does not know Cygwin's emulated mounts,
 
80
        # convert to Win32 path and remove drive letter.
 
81
        path=`cygpath -m "$path" | sed -n 's,^[A-Za-z]:,,p'`
 
82
        test ! -z "$path" || return 1
 
83
      fi ;;
 
84
  esac
 
85
 
 
86
  echo "$path"
72
87
}
73
88
 
74
89
is_path_readable_by_grub ()