#!/bin/bash # # generated by Chef from the debmirror cookbook # # Architecture (i386, powerpc, amd64, etc.) arch=<%= @arch.join(',') %> # Section (main,contrib,non-free) section=<%= @section.join(',') %> # Release of the system (squeeze,lenny,stable,testing,etc) release=<%= @release.join(',') %> # Server name, minus the protocol and the path at the end server=<%= @server %> # Path from the main server, so http://my.web.server/$dir, Server dependant path=<%= @path %> # Protocol to use for transfer (http, ftp, hftp, rsync) proto=<%= @proto %> # Directory to store the mirror in storage=<%= @storage %> # Start script <%- if @rsync_extra == ['none'] -%> # filter out trace warning assuming we know what we are doing: error_filter() { "$@" 2> >(sed -e '/Warning: --rsync-extra is not configured to mirror the trace files\.$/{N;/ *This configuration is not recommended\./d}' >&2) } error_filter <%- end -%>debmirror \ --dist $release \ --arch $arch \ --section $section \ --method $proto \ --host $server \ --root $path \ --keyring <%= @keyring %> \ <%- if @rsync_extra -%> --rsync-extra <%= @rsync_extra.join(',') %> \ <%- end -%> <% @options.each do |option| %> <%= option %> \ <% end -%> $storage "$@"