symbolic links to `.lldbinit` and `.gdbinit` are getting removed
nateozem opened this issue · comments
Whenever execute install.sh
, the symbolic links to .lldbinit
and .gdbinit
are getting replaced with new files. From the look of it, the piece of code below is doing this:
# Add Voltron to lldbinit
LLDB_INIT_FILE="${HOME}/.lldbinit"
if [ -e ${LLDB_INIT_FILE} ]; then
sed -i.bak '/voltron/d' ${LLDB_INIT_FILE}
fi
sed
doesn't care if the path is a link or not, it will replace the target path with a new file.
Here are several options to resolve this:
a. leave as is.
b. use realpath
command on target file.
c. don't replace file, but warn user to insert text to the targeted file.
Please let me know if there are any other suggestions.
I think option b
is the best one. I have lldb configuration on a Dropbox folder ( ;) ) and I share all of my settings thru it. But... I have different accounts on different computers so absolute path would stil break for me ;) Option c
then ;)