Rebar and the Developer Shell

In some cases (e.g. during development) it is helpful to symlink applications into a release, rather than copying them. I believe relx has a dev-mode option for that. In rebar-based projects, what I end up doing in most of the cases is to add something like this into a Makefile:

devrel: rel
  $(foreach dep, $(wildcard deps/* apps/*), \
    $(eval $@_target := $(wildcard rel/svt/lib/$(shell basename $(dep))-*)) \
    rm -rf $($@_target) && ln -sfn $(abspath $(dep)) $($@_target); \
  )

Riak does something on these lines, too.

Even if I don’t think this behaviour is achievable directly via reltool, it could be implement as an optional step in rebar_reltool or via a dedicated plugin or separate command.

I will probably give this a try at some point. Does anyone have an opinion on the above?