summaryrefslogtreecommitdiff
path: root/7/main.pl
diff options
context:
space:
mode:
Diffstat (limited to '7/main.pl')
-rw-r--r--7/main.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/7/main.pl b/7/main.pl
index 684708f..393ad55 100644
--- a/7/main.pl
+++ b/7/main.pl
@@ -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).