* bootstrap (update_po_files): Work also when there are no .po files in po/.
authorJim Meyering <meyering@redhat.com>
Thu, 4 Oct 2007 09:55:31 +0000 (11:55 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 4 Oct 2007 09:55:31 +0000 (11:55 +0200)
ChangeLog
bootstrap

index 2d1ec4c..25c9c3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2007-10-04  Jim Meyering  <jim@meyering.net>
 
        * bootstrap (slurp): Adapt to _.h -> .in.h name change.
+       (update_po_files): Work also when there are no .po files in po/.
 
        Remove test program: lib/t-fpending.c.
        * lib/t-fpending.c: Remove file.  Now, this test is in gnulib.
index 4b0a7b1..aa86d3d 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -281,13 +281,16 @@ update_po_files() {
     && ls "$ref_po_dir"/*.po 2>/dev/null |
       sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
 
+  langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
+  test "$langs" = '*' && langs=x
   for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do
-     new_po="$ref_po_dir/$po.po"
-     cksum_file="$ref_po_dir/$po.s1"
-     if ! sha1sum -c --status "$cksum_file" < "$new_po" > /dev/null; then
-       echo "updated $po_dir/$po.po..."
-       cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file"
-     fi
+    case $po in x) continue;; esac
+    new_po="$ref_po_dir/$po.po"
+    cksum_file="$ref_po_dir/$po.s1"
+    if ! sha1sum -c --status "$cksum_file" < "$new_po" > /dev/null; then
+      echo "updated $po_dir/$po.po..."
+      cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file"
+    fi
   done
 }