[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    l10n/scripts
From:       David Faure <faure () kde ! org>
Date:       2007-01-11 9:41:57
Message-ID: 1168508517.800523.4634.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 622269 by dfaure:

Support for installing the script instead of running it from l10n/scripts


 M  +11 -7     check_po_files  


--- trunk/l10n/scripts/check_po_files #622268:622269
@@ -335,7 +335,7 @@
 			$relpath =~ s,$prefix/,,;
 			print STDERR "Warning: $fullrelpath looks like the template moved to $newloc. \
Consider using scripts/rename_or_move $relpath $newloc\n";  } else {
-			print STDERR "Warning: $fullrelpath looks like an orphan - there is no more \
$template (check for renamings with svnlastlog)\n"; +			print STDERR "Warning: \
$fullrelpath looks like an orphan - there is no more $pattern (check for renamings \
with svnlastlog)\n";  #system("cvs rm -f $fullrelpath");
 			#next;
 		}
@@ -378,11 +378,14 @@
 }
 
 # We must find the topdir (l10n) since the templates are under there
-$topdir = $0;
-$topdir = cwd() . "/" . $0 unless ($topdir =~ m,^/,);
-$topdir = Cwd::realpath(dirname($topdir));
-# The dir of the script is scripts/, we need to go one level up
-$topdir = dirname($topdir);
+$topdir = Cwd::realpath(cwd());
+while ( ! -d $topdir."/scripts" ) {
+  $topdir = dirname($topdir);
+  if ($topdir eq '/') {
+    $topdir = Cwd::realpath(cwd());
+    die "scripts not found when going up from $topdir";
+  }
+}
 #print STDERR "topdir=$topdir\n";
 
 my $plural_forms = "";
@@ -410,7 +413,7 @@
 			$plural_forms = find_plural_form($current_file);
 			$last_language = $lang;
 		}
-	} else { die; }
+	} else { die "invalid relpath $relpath"; }
 
 	# Now open the po file
 	# my %msgstrs = ();
@@ -529,5 +532,6 @@
 } else {
 	$startdir = cwd();
 }
+#print "startdir=$startdir\n"
 
 &recursive_check($startdir);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic