2008-05-06 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (make_system_path_relative_to_its_root): Do not print a trailing slash (therefore, the root directory is an empty string). (convert_system_path_to_grub_path): Do not remove trailing slash from make_system_path_relative_to_its_root() output. * util/i386/pc/grub-install.in: Add trailing slash to output from make_system_path_relative_to_its_root().
This commit is contained in:
parent
6cf12cbd25
commit
b0346e0f43
3 changed files with 20 additions and 5 deletions
|
@ -61,7 +61,14 @@ make_system_path_relative_to_its_root ()
|
|||
dir=$parent
|
||||
done
|
||||
|
||||
echo $path | sed -e "s,^$dir,/,g" -e "s,//,/,g"
|
||||
# This function never prints trailing slashes (so that its output can be
|
||||
# appended a slash unconditionally). Each slash in $dir is considered a
|
||||
# preceding slash, and therefore the root directory is an empty string.
|
||||
if [ "$dir" = "/" ] ; then
|
||||
dir=""
|
||||
fi
|
||||
|
||||
echo $path | sed -e "s,^$dir,,g"
|
||||
}
|
||||
|
||||
convert_system_path_to_grub_path ()
|
||||
|
@ -86,9 +93,6 @@ convert_system_path_to_grub_path ()
|
|||
return 1
|
||||
fi
|
||||
|
||||
# remove any trailing slash, even if that slash is everything we have
|
||||
relative_path=`echo ${relative_path} | sed -e "s,/*$,,g"`
|
||||
|
||||
echo ${drive}${relative_path}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue