Only replace the last instance of "sudo" in example and doc dir.
Otherwise we end up with weird paths for a prefix like /opt/sudo.
This commit is contained in:
@@ -76,6 +76,15 @@ This makes it possible to have all sudo I/O logs on a central server."
|
|||||||
odocdir="${docdir}"
|
odocdir="${docdir}"
|
||||||
oexampledir="${exampledir}"
|
oexampledir="${exampledir}"
|
||||||
|
|
||||||
|
# docdir and exampledir are installed with "sudo" as the package
|
||||||
|
# name which may not be correct.
|
||||||
|
docdir="`echo \"${docdir}\" | sed 's#/sudo$#/'\"${name}\"'#'`"
|
||||||
|
if test "${exampledir}" = "${odocdir}/examples"; then
|
||||||
|
exampledir="${docdir}/examples"
|
||||||
|
else
|
||||||
|
exampledir="`echo \"${exampledir}\" | sed 's#/sudo$#/'\"${name}\"'#'`"
|
||||||
|
fi
|
||||||
|
|
||||||
# For RedHat the doc dir is expected to include version and release
|
# For RedHat the doc dir is expected to include version and release
|
||||||
case "$pp_rpm_distro" in
|
case "$pp_rpm_distro" in
|
||||||
centos*|rhel*|f[0-9]*)
|
centos*|rhel*|f[0-9]*)
|
||||||
@@ -84,11 +93,6 @@ This makes it possible to have all sudo I/O logs on a central server."
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# docdir and exampledir are installed with "sudo" as the package
|
|
||||||
# name which may not be correct.
|
|
||||||
docdir="`echo \"${docdir}\" | sed \"s#/sudo#/${name}#g\"`"
|
|
||||||
exampledir="`echo \"${exampledir}\" | sed \"s#/sudo#/${name}#g\"`"
|
|
||||||
|
|
||||||
# Copy docdir and exampledir to new names if needed
|
# Copy docdir and exampledir to new names if needed
|
||||||
if test ! -d "${pp_destdir}${docdir}"; then
|
if test ! -d "${pp_destdir}${docdir}"; then
|
||||||
cp -R ${pp_destdir}${odocdir} ${pp_destdir}${docdir}
|
cp -R ${pp_destdir}${odocdir} ${pp_destdir}${docdir}
|
||||||
|
@@ -36,6 +36,15 @@
|
|||||||
odocdir="${docdir}"
|
odocdir="${docdir}"
|
||||||
oexampledir="${exampledir}"
|
oexampledir="${exampledir}"
|
||||||
|
|
||||||
|
# docdir and exampledir are installed with "sudo" as the package
|
||||||
|
# name which may not be correct.
|
||||||
|
docdir="`echo \"${docdir}\" | sed 's#/sudo$#/'\"${name}\"'#'`"
|
||||||
|
if test "${exampledir}" = "${odocdir}/examples"; then
|
||||||
|
exampledir="${docdir}/examples"
|
||||||
|
else
|
||||||
|
exampledir="`echo \"${exampledir}\" | sed 's#/sudo$#/'\"${name}\"'#'`"
|
||||||
|
fi
|
||||||
|
|
||||||
# For RedHat the doc dir is expected to include version and release
|
# For RedHat the doc dir is expected to include version and release
|
||||||
case "$pp_rpm_distro" in
|
case "$pp_rpm_distro" in
|
||||||
centos*|rhel*|f[0-9]*)
|
centos*|rhel*|f[0-9]*)
|
||||||
@@ -44,11 +53,6 @@
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# docdir and exampledir are installed with "sudo" as the package
|
|
||||||
# name which may not be correct.
|
|
||||||
docdir="`echo \"${docdir}\" | sed \"s#/sudo#/${name}#g\"`"
|
|
||||||
exampledir="`echo \"${exampledir}\" | sed \"s#/sudo#/${name}#g\"`"
|
|
||||||
|
|
||||||
# Copy docdir and exampledir to new names if needed
|
# Copy docdir and exampledir to new names if needed
|
||||||
if test ! -d "${pp_destdir}${docdir}"; then
|
if test ! -d "${pp_destdir}${docdir}"; then
|
||||||
cp -R ${pp_destdir}${odocdir} ${pp_destdir}${docdir}
|
cp -R ${pp_destdir}${odocdir} ${pp_destdir}${docdir}
|
||||||
|
Reference in New Issue
Block a user