diff options
Diffstat (limited to '7/main.pl')
-rw-r--r-- | 7/main.pl | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -22,10 +22,10 @@ print_warnings :- ; format("No warnings!~n", []) ). -rm_rf(Dir) :- +rm_rf(Parents) :- + path_segments(Dir, Parents), directory_files(Dir, Files), - path_segments(Dir, Ps), - rm_rf_files(Ps, Files). + rm_rf_files(Parents, Files). rm_rf_files(_, []). rm_rf_files(Parents, [D|Dir]) :- @@ -47,6 +47,6 @@ rm_rf_files(Parents, [D|Dir]) :- main :- bgp:create_firewall, print_warnings, - bgp:bird_config(BirdDict), - rm_rf("host_vars"), - yaml_write(current_output, BirdDict). + path_segments("host_vars", Path), + rm_rf(Path), + firewall:write(Path). |