summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-09-12 13:13:29 +0200
committerDavid Tardon <dtardon@redhat.com>2011-09-12 13:47:42 +0200
commitee5be04107690cb3641d6a44b1bea722f99c4915 (patch)
tree35a37f51501b494a62b89fdeeb7bd4b447c4acae /solenv
parente47a28b3fd0f1dbf9086884bbb75866b636b38ab (diff)
do not allow creating symlink to itself
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/install-gdb-printers5
1 files changed, 3 insertions, 2 deletions
diff --git a/solenv/bin/install-gdb-printers b/solenv/bin/install-gdb-printers
index 0a1c90d36d02..289a986e6667 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