Package: apt-move / 4.2.27-5

add-copydir.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Author: Blars Blarson <blarson@blars.org>
Description: Add copydir command for taking files from distribution CDs
Bug-Debian: http://bugs.debian.org/316643
Index: apt-move/apt-move
===================================================================
--- apt-move.orig/apt-move	2012-01-08 03:08:10.000000000 +0800
+++ apt-move/apt-move	2012-01-08 03:09:01.251326096 +0800
@@ -100,6 +100,8 @@
 	Usage:    apt-move [-c conffile] [-d dist] [-afqt] COMMAND
 	
 	Commands:
+	       copydir     - like movefile, but copies all .deb files
+	                     from the specified directory
 	       get         - update your master files from local apt.
 	       getlocal    - alias of get.
 	       fsck        - fix broken repositories, use with caution.
@@ -1884,6 +1886,16 @@
 	$1$2
 	;;
 
+copydir)
+        shift
+	if [ -z "$*" ]; then
+	        showusage
+	fi
+	PROGNAME=copydir
+	COPYONLY=yes
+	find "$*" -type f -name \*.deb -print -o -name \*.udeb -print -o -name \*.dsc -print | movefiles
+	;;
+
 *)
 	showusage
 	;;
Index: apt-move/apt-move.8
===================================================================
--- apt-move.orig/apt-move.8	2012-01-08 02:28:16.000000000 +0800
+++ apt-move/apt-move.8	2012-01-08 03:09:01.251326096 +0800
@@ -198,6 +198,13 @@
 it will move the files specified on the command line.
 
 .TP
+.BI copydir \ directory...
+This command is similar to movefile.  Instead of moving files from the
+command line, it will copy .deb files from the specified directory.
+This is useful for copying the pool of a Debian CD to an apt
+repository.
+
+.TP
 \fBlistbin \fR[ \fBmirror \fR| \fBsync \fR| \fBrepo \fR]
 This command prints a list of packages which may serve as the input to
 mirrorbin or mirrorsrc.  If the argument is