From 7ba2dd808232cff3ee76aaceb97f4381c3c9cde4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 4 Oct 2007 11:55:31 +0200 Subject: * bootstrap (update_po_files): Work also when there are no .po files in po/. --- bootstrap | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 4b0a7b193..aa86d3d52 100755 --- 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 } -- cgit v1.2.3-70-g09d2