Browse code

Fix index generator for apt/yum packages

Some @_@ characters could become visible if filename is longer than 44
characters.

Signed-off-by: Tibor Vass <tibor@docker.com>

Tibor Vass authored on 2016/02/17 07:51:55
Showing 1 changed files
... ...
@@ -41,7 +41,7 @@ create_index() {
41 41
 	IFS=$'\n';
42 42
 
43 43
 	# pretty sweet, will mimick the normal apache output
44
-	for L in $(find -L . -mount -depth -maxdepth 1 -type f ! -name 'index' -printf "<a href=\"%f\">%-44f@_@%Td-%Tb-%TY %Tk:%TM  @%f@\n"|sort|sed 's,\([\ ]\+\)@_@,</a>\1,g');
44
+	for L in $(find -L . -mount -depth -maxdepth 1 -type f ! -name 'index' -printf "<a href=\"%f\">%f|@_@%Td-%Tb-%TY %Tk:%TM  @%f@\n"|sort|column -t -s '|' | sed 's,\([\ ]\+\)@_@,</a>\1,g');
45 45
 	do
46 46
 		# file
47 47
 		F=$(sed -e 's,^.*@\([^@]\+\)@.*$,\1,g'<<<"$L");