Closed ypcrts closed 6 years ago
Are there problems with the current "symlink-agnostic" way manage-tools
works? I don't see an issue with having CTF_TOOLS_ROOT
point to the symlink. In fact, if I'm symlinking ctftools, I'd probably prefer to have the tools have the symlink in their configurations rather than the real path.
Are there problems with the current "symlink-agnostic" way manage-tools works?
Yes. Currently in HEAD we chdir like this https://github.com/zardus/ctf-tools/blob/9b5a706ee7ebc16d1c80637d577610abf98cf007/bin/manage-tools#L310
git clone https://github.com/zardus/ctf-tools ~/Projects/ctf-tools
ln -s ~/Projects/ctf-tools/bin/manage-tools ~/bin/zardus_ctf_tools
export PATH="$PATH:~/bin"
Of course this is not an intended use case, but if the minor patch doesn't hurt, it would be nice to have.
I see... So this is used when manage_tools
is linked in to a bin dir somewhere instead of the ctf-tools bin dir being added to PATH
?
What I dislike about this is that I think it'll subtly break the case when the ctf-tools
directory itself is sym-linked. The directory link will be resolved by realpath
, and all the tools will install expecting that real path. I have had installs that this would have broken, but I've never had installs where I linked in manage_tools
instead of adding its bin dir to my path. :-(
manage-tools
work if it's symlinked from elsewhere