[Libreoffice-commits] .: solenv/bin

David Tardon dtardon at kemper.freedesktop.org
Mon Sep 12 04:48:55 PDT 2011


 solenv/bin/install-gdb-printers |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ee5be04107690cb3641d6a44b1bea722f99c4915
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Sep 12 13:13:29 2011 +0200

    do not allow creating symlink to itself

diff --git a/solenv/bin/install-gdb-printers b/solenv/bin/install-gdb-printers
index 0a1c90d..289a986 100755
--- a/solenv/bin/install-gdb-printers
+++ b/solenv/bin/install-gdb-printers
@@ -49,13 +49,14 @@ make_autoload() {
         mkdir -p "${dir}" || die "cannot create dir '${dir}'"
     fi
 
-    [[ -f ${lib}-gdb.py ]] && rm -f "${lib}-gdb.py"
     if ${link}; then
-        if [[ ! -f ${lib}-gdb.py ]]; then
+        if [[ ${dir} != ${SOLVERLIBDIR} ]]; then
             local gdbname="${lib##*/}-gdb.py"
+            [[ -f ${dir}/${gdbname} ]] && rm -f "${dir}/${gdbname}"
             ln -s "${SOLVERLIBDIR}/${gdbname}" "${dir}/${gdbname}"
         fi
     else
+        [[ -f ${lib}-gdb.py ]] && rm -f "${lib}-gdb.py"
         sed -e "s!%PYTHONDIR%!${pythondir}!" -e "s!%MODULE%!libreoffice.$1!" \
             "${GDBDIR}/autoload.template" > "${lib}-gdb.py"
     fi


More information about the Libreoffice-commits mailing list