blob: 32a9bd99e15354604859b89fcf6813513e6f0537 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env escript
%%! -noshell
%% Openbox pipe menu entry point. Tries the running daemon's Unix
%% socket first; falls back to an inline scan+parse+render if it
%% isn't reachable. See src/er_xdg_pipe_menu_cli.erl for the logic --
%% this script only wires up the code path to the compiled app.
main(Args) ->
add_code_paths(),
er_xdg_pipe_menu_cli:main(Args).
add_code_paths() ->
ScriptDir = filename:dirname(filename:absname(escript:script_name())),
RepoRoot = filename:dirname(ScriptDir),
Pattern = filename:join([RepoRoot, "_build", "default", "lib", "*", "ebin"]),
code:add_pathsz(filelib:wildcard(Pattern)).
|