When I try to set a relative code path in a escript with -pz like this
#!/usr/bin/env escript
%% -*- erlang -*-
%%! -pz ../dir-of-some-beams
The path is interpreted relative to the directory from where I run the escript from, which renders it useless for setting the path relative to the script location.
My current "workaround" is using a absolute path which is annoying since all this is part of a repository and I don't want it to be location dependent.
So how can I set the code path relative to the directory the escript is located in?