[aisleriot] Sort game-names.h alphabetically



commit c611a0969f5b6ebaf0c9b78caf6583181c8211e4
Author: Christian Persch <chpe gnome org>
Date:   Tue Aug 16 00:23:42 2011 +0200

    Sort game-names.h alphabetically

 src/get_titles.pl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/get_titles.pl b/src/get_titles.pl
index a84fe05..cfb52c5 100755
--- a/src/get_titles.pl
+++ b/src/get_titles.pl
@@ -24,10 +24,12 @@
 open OUTFILE, "> game-names.h";
 
 opendir(DIR, "../games/");
+ dir = sort(readdir(DIR));
+closedir(DIR);
 
 print OUTFILE "/* This is a generated file; DO NOT EDIT */\n";
 
-while ($_ = readdir(DIR)) {
+foreach $_ (@dir) {
   if (s/^(.)(.*).scm/\u$1$2/) { # Match scm filenames. Upcase first letter.
     s/_(.)/ \u$1/g;             # Replace underscores and following letter
 				# with space and upcase letter.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]