commit bcd05babf6cbcae654824dfcf0feda2992b02cad Author: Keshav P R
Date: Mon Feb 20 23:11:03 2012 +0530 Use pkgdatadir and no sed transform for all .in util scripts and grub.d scripts diff --git a/ChangeLog b/ChangeLog index 20499d7..e50d398 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2012-02-20 Keshav P R + + * util/grub-install.in (pkgdatadir): Remove sed transform. + * util/grub-kbdcomp.in: Likewise. + * util/grub-mkconfig.in: Likewise. + * util/grub-mkconfig_lib.in: Likewise. + * util/grub-mknetdir.in: Likewise. + * util/grub-mkrescue.in: Likewise. + * util/grub-mkstandalone.in: Likewise. + * util/grub-reboot.in: Likewise. + * util/grub-set-default.in: Likewise. + * util/grub.d/00_header.in: Add pkgdatadir and source + grub-mkconfig_lib from there. + * util/grub.d/10_hurd.in: Likewise. + * util/grub.d/10_illumos.in: Likewise. + * util/grub.d/10_kfreebsd.in: Likewise. + * util/grub.d/10_linux.in: Likewise. + * util/grub.d/10_netbsd.in: Likewise. + * util/grub.d/10_windows.in: Likewise. + * util/grub.d/20_linux_xen.in: Likewise. + * util/grub.d/30_os-prober.in: Likewise. + 2012-02-19 Samuel Thibault * util/grub-mkconfig.in (GRUB_CMDLINE_GNUMACH): Export variable. diff --git a/util/grub-install.in b/util/grub-install.in index 747ef17..acce046 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -35,7 +35,7 @@ address@hidden@ pkglibdir="${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`" datadir="@datadir@" if [ "x$pkgdatadir" = x ]; then - pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`" + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" fi localedir="@datadir@/locale" diff --git a/util/grub-kbdcomp.in b/util/grub-kbdcomp.in index 3938734..87c0100 100644 --- a/util/grub-kbdcomp.in +++ b/util/grub-kbdcomp.in @@ -8,7 +8,7 @@ bindir="@bindir@" datarootdir="@datarootdir@" datadir="@datadir@" if [ "x$pkgdatadir" = x ]; then - pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`" + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" fi grub_mklayout="${bindir}/`echo grub-mklayout | sed ${transform}`" diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 9c40505..dfb9829 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -32,7 +32,7 @@ address@hidden@ address@hidden@ datadir="@datadir@" if [ "x$pkgdatadir" = x ]; then - pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`" + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" fi grub_cfg="" grub_mkconfig_dir="${sysconfdir}"/grub.d diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in index a32a2b2..ef0cf6c 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -22,7 +22,7 @@ datarootdir="@datarootdir@" datadir="@datadir@" bindir="@bindir@" sbindir="@sbindir@" -pkgdatadir="${datadir}/`echo "@PACKAGE_TARNAME@" | sed "${transform}"`" +pkgdatadir="${datadir}/@PACKAGE_TARNAME@" if test "x$grub_probe" = x; then grub_probe="${sbindir}/`echo grub-probe | sed "${transform}"`" diff --git a/util/grub-mknetdir.in b/util/grub-mknetdir.in index eec170a..3726dde 100644 --- a/util/grub-mknetdir.in +++ b/util/grub-mknetdir.in @@ -31,7 +31,7 @@ address@hidden@ pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst" datadir="@datadir@" if [ "x$pkgdatadir" = x ]; then - pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`" + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" fi self=`basename $0` diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in index cd57d41..33c63e1 100644 --- a/util/grub-mkrescue.in +++ b/util/grub-mkrescue.in @@ -31,7 +31,7 @@ address@hidden@ address@hidden@ datadir="@datadir@" if [ "x$pkgdatadir" = x ]; then - pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`" + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" fi pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst" diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in index 2351477..f554fc9 100644 --- a/util/grub-mkstandalone.in +++ b/util/grub-mkstandalone.in @@ -32,7 +32,7 @@ address@hidden@ pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst" datadir="@datadir@" if [ "x$pkgdatadir" = x ]; then - pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`" + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" fi self=`basename $0` diff --git a/util/grub-reboot.in b/util/grub-reboot.in index 1dfa382..692fe5b 100644 --- a/util/grub-reboot.in +++ b/util/grub-reboot.in @@ -27,7 +27,7 @@ address@hidden@ datarootdir="@datarootdir@" datadir="@datadir@" if [ "x$pkgdatadir" = x ]; then - pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`" + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" fi self=`basename $0` diff --git a/util/grub-set-default.in b/util/grub-set-default.in index 49e7a4d..04065c5 100644 --- a/util/grub-set-default.in +++ b/util/grub-set-default.in @@ -27,7 +27,7 @@ address@hidden@ datarootdir="@datarootdir@" datadir="@datadir@" if [ "x$pkgdatadir" = x ]; then - pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`" + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" fi self=`basename $0` diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in index d9bcc15..694ae43 100644 --- a/util/grub.d/00_header.in +++ b/util/grub.d/00_header.in @@ -24,8 +24,12 @@ exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}` grub_lang=`echo $LANG | cut -d . -f 1` +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +. "${pkgdatadir}/grub-mkconfig_lib" # Do this as early as possible, since other commands might depend on it. # (e.g. the `loadfont' command might need lvm or raid modules) diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in index 6a0d22b..980a3d3 100644 --- a/util/grub.d/10_hurd.in +++ b/util/grub.d/10_hurd.in @@ -20,7 +20,12 @@ set -e prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi + +. "${pkgdatadir}/grub-mkconfig_lib" CLASS="--class gnu --class os" diff --git a/util/grub.d/10_illumos.in b/util/grub.d/10_illumos.in index a4be7ba..eac1d35 100644 --- a/util/grub.d/10_illumos.in +++ b/util/grub.d/10_illumos.in @@ -20,7 +20,12 @@ set -e prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi + +. "${pkgdatadir}/grub-mkconfig_lib" export address@hidden@ export TEXTDOMAINDIR="@localedir@" diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in index c315512..d9b96b5 100644 --- a/util/grub.d/10_kfreebsd.in +++ b/util/grub.d/10_kfreebsd.in @@ -20,7 +20,12 @@ set -e prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi + +. "${pkgdatadir}/grub-mkconfig_lib" export address@hidden@ export TEXTDOMAINDIR="@localedir@" diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index bc738f2..4e95475 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -20,8 +20,12 @@ set -e prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +. "${pkgdatadir}/grub-mkconfig_lib" export address@hidden@ export TEXTDOMAINDIR="@localedir@" diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in index 236842d..b602ab1 100644 --- a/util/grub.d/10_netbsd.in +++ b/util/grub.d/10_netbsd.in @@ -20,7 +20,12 @@ set -e prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi + +. "${pkgdatadir}/grub-mkconfig_lib" export address@hidden@ export TEXTDOMAINDIR="@localedir@" diff --git a/util/grub.d/10_windows.in b/util/grub.d/10_windows.in index 4d8331d..02503ec 100644 --- a/util/grub.d/10_windows.in +++ b/util/grub.d/10_windows.in @@ -20,8 +20,12 @@ set -e prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +. "${pkgdatadir}/grub-mkconfig_lib" case "`uname 2>/dev/null`" in CYGWIN*) ;; diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index 56771ab..9b5b0dd 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -20,8 +20,12 @@ set -e prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +. "${pkgdatadir}/grub-mkconfig_lib" export address@hidden@ export TEXTDOMAINDIR="@localedir@" diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in index 63800c1..62072dc 100644 --- a/util/grub.d/30_os-prober.in +++ b/util/grub.d/30_os-prober.in @@ -20,8 +20,12 @@ set -e prefix="@prefix@" exec_prefix="@exec_prefix@" datarootdir="@datarootdir@" +datadir="@datadir@" +if [ "x$pkgdatadir" = x ]; then + pkgdatadir="${datadir}/@PACKAGE_TARNAME@" +fi -. "@datadir@/@PACKAGE@/grub-mkconfig_lib" +. "${pkgdatadir}/grub-mkconfig_lib" if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then exit 0