diff options
author | David Tardon <dtardon@redhat.com> | 2011-09-12 13:13:29 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-09-12 13:47:42 +0200 |
commit | ee5be04107690cb3641d6a44b1bea722f99c4915 (patch) | |
tree | 35a37f51501b494a62b89fdeeb7bd4b447c4acae /solenv/bin | |
parent | e47a28b3fd0f1dbf9086884bbb75866b636b38ab (diff) |
do not allow creating symlink to itself
Diffstat (limited to 'solenv/bin')
-rwxr-xr-x | solenv/bin/install-gdb-printers | 5 |
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 |