Kaydet (Commit) ee5be041 authored tarafından David Tardon's avatar David Tardon

do not allow creating symlink to itself

üst e47a28b3
...@@ -49,13 +49,14 @@ make_autoload() { ...@@ -49,13 +49,14 @@ make_autoload() {
mkdir -p "${dir}" || die "cannot create dir '${dir}'" mkdir -p "${dir}" || die "cannot create dir '${dir}'"
fi fi
[[ -f ${lib}-gdb.py ]] && rm -f "${lib}-gdb.py"
if ${link}; then if ${link}; then
if [[ ! -f ${lib}-gdb.py ]]; then if [[ ${dir} != ${SOLVERLIBDIR} ]]; then
local gdbname="${lib##*/}-gdb.py" local gdbname="${lib##*/}-gdb.py"
[[ -f ${dir}/${gdbname} ]] && rm -f "${dir}/${gdbname}"
ln -s "${SOLVERLIBDIR}/${gdbname}" "${dir}/${gdbname}" ln -s "${SOLVERLIBDIR}/${gdbname}" "${dir}/${gdbname}"
fi fi
else else
[[ -f ${lib}-gdb.py ]] && rm -f "${lib}-gdb.py"
sed -e "s!%PYTHONDIR%!${pythondir}!" -e "s!%MODULE%!libreoffice.$1!" \ sed -e "s!%PYTHONDIR%!${pythondir}!" -e "s!%MODULE%!libreoffice.$1!" \
"${GDBDIR}/autoload.template" > "${lib}-gdb.py" "${GDBDIR}/autoload.template" > "${lib}-gdb.py"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment