#!/bin/bash
echo "You want update repository?";
echo "Path:"
read OUTP;
# Arch= -a # Архитектура - i386, powerpc или amd64.
arch=i386
# Minimum Ubuntu system requires main, restricted
# Section= -s # Section (One of the following - main/restricted/universe/multiverse).
section=main,restricted,universe,multiverse
# Release= -d # Release of the system (Dapper, Edgy, Feisty, Gutsy), and the -updates and -security ( -backports can be added if desired)
release=lucid,lucid-security,lucid-updates,lucid-backports
# Server= -h # Server name, minus the protocol and the path at the end
# CHANGE "*" to equal the mirror you want to create your mirror from. au. in Australia ca. in Canada.
# This can be found in your own /etc/apt/sources.list file, assuming you have Ubuntu installed.
server=ftp.corbina.ru/pub/Linux/
# Dir= -r # Path from the main server, so
http://my.web.server/$dir, Server dependant
inPath=/ubuntu
# Proto= -e # Protocol to use for transfer (http, ftp, hftp, rsync)
# Choose one - http is most usual the service, and the service must be avaialbe on the server you point at.
proto=http
# Outpath= # Directory to store the mirror in
# Make this a full path to where you want to mirror the material.
outPath=$OUTP
# The --nosource option only downloads debs and not deb-src's
# The --progress option shows files as they are downloaded
# --source \ in the place of --no-source \ if you want sources also.
debmirror -a $arch \
--no-source \
-s $section \
-h $server \
-d $release \
-r $inPath \
--progress \
-e $proto \
--ignore-release-gpg \
$outPath
read " "