Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm updating our distribution of magic and noticed that my fixes in #41
had broken, so this attempts to restore them. I understand that there's
a number of different configurations that people use magic in, so I'm
happy to carry these locally in our distribution setup if they break something
else, but I figured I'd at least have another go at it.
The three changes here are:
bin/magic
script.I understand this got reverted in c0867ef because it broke symlinking to the script. This adds an extra
readlink -f
to fix that corner case. However, since I don't know the exact details of what broke there, it'd be good to verify that.CAD_ROOT
rather than using theCAD_ROOT_DEFAULT
variable I added. However, the corresponding creation of theCAD_ROOT_DEFAULT
variable in magic.tcl was not adjusted, so cad root was not set automatically. Fix that by renaming theCAD_ROOT_DEFAULT
toCAD_ROOT
there also (making sure to respect it if already set).magicdnull
andmagicexec
. This fixes downstream tooling that does things likemagic --version
which currently just starts a tcl interpreter (blocking forever) ismagic.tcl
is not found because it was relocated.