summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-09-07 15:46:31 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-09-07 15:46:31 +0200
commit2ca10b643467e1c5bcb5c1d987b2b540cf6e463e (patch)
treec1b8ec7c649a6336a51b127360fcd526a31707ca
parentaa2c3355f44be5d52f704daee0f10ef8dfd322ab (diff)
Sort files
-rwxr-xr-xinclude/gen-xhtml-thumbnails14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/gen-xhtml-thumbnails b/include/gen-xhtml-thumbnails
index ee8087a..220e4fc 100755
--- a/include/gen-xhtml-thumbnails
+++ b/include/gen-xhtml-thumbnails
@@ -27,7 +27,7 @@ sub print_progress {
$| = 1;
open(my $index, '>', $indexfile);
-print $index <<ficken;
+print $index <<EOD;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
@@ -37,7 +37,7 @@ print $index <<ficken;
<link rel="stylesheet" type="text/css" href="foo.css"/>
</head>
<body><div>
-ficken
+EOD
if (! -d $thumbdir) {
mkdir($thumbdir) or die("cannot create $thumbdir: $!");
@@ -51,10 +51,10 @@ closedir($dirhandle);
print "Generating thumbnails [ - cached | + generated ]\n";
-foreach $file (@files) {
-print $index <<ficken;
+foreach $file (sort(@files)) {
+print $index <<EOD;
<a href="$file"><img src=".thumbs/$file"/></a>
-ficken
+EOD
print_progress;
$number++;
@@ -76,10 +76,10 @@ ficken
}
print "\n";
-print $index <<ficken;
+print $index <<EOD;
</div></body>
</html>
-ficken
+EOD
close($index);
chmod(0644, $indexfile);