-<% @exports.each do |directory,clients| -%>
-<%= directory -%> -sync,subtree_check<% clients.each do |address,options| -%> <%= address -%>(<%= options -%>)<% end %>
+<% @exports.sort.each do |directory,clients| -%>
+<% clients.sort.each do |address,options| -%>
+<%= directory -%> -sync,subtree_check,<%= options %> <%= address %>