allow running scripts using fennelrepl
e.g. FENNEL_PATH=pkgs/?/init.fnl\;pkgs/?.fnl nix-shell --run "fennelrepl ./examples/acquire-delegated-prefix.fnl /tmp/boo eth1"
This commit is contained in:
parent
e7de889403
commit
708350711b
1 changed files with 6 additions and 2 deletions
|
@ -29,6 +29,10 @@ in writeScriptBin "fennelrepl" ''
|
|||
if more_fennel then
|
||||
fennel.path = more_fennel .. ";" .. fennel.path
|
||||
end
|
||||
print("path", fennel.path)
|
||||
fennel.repl()
|
||||
if #arg > 0 then
|
||||
script = table.remove(arg, 1)
|
||||
fennel.dofile(script, {}, arg)
|
||||
else
|
||||
fennel.repl()
|
||||
end
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue