diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2020-08-27 18:50:27 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2020-08-27 19:07:43 +0200 |
commit | 1626b961a39e254c128886ce34a9a2902e93e945 (patch) | |
tree | da92d7f2744478f8bcd3ae2cf675d261bb8a78b7 | |
parent | 2daa9a75af6a824758eb99cd745a7766388339d0 (diff) | |
download | fetchmail-1626b961a39e254c128886ce34a9a2902e93e945.tar.gz fetchmail-1626b961a39e254c128886ce34a9a2902e93e945.tar.bz2 fetchmail-1626b961a39e254c128886ce34a9a2902e93e945.zip |
git-commit-po-updates.sh: Robustness fixes.
-rwxr-xr-x | dist-tools/git-commit-po-updates.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/dist-tools/git-commit-po-updates.sh b/dist-tools/git-commit-po-updates.sh index 41b1f65a..f7c4d759 100755 --- a/dist-tools/git-commit-po-updates.sh +++ b/dist-tools/git-commit-po-updates.sh @@ -19,7 +19,7 @@ # 3: new po/*.po files detected set -eu - +unset IFS cd "$(realpath $(dirname $0))/.." # see if Perl has Carp::Always available, @@ -101,9 +101,8 @@ rc=0 if [ -z "$dryrun_pfx" -a -z "$docommit" ] ; then usage 2 ; fi -new_po_files=$(git status --porcelain=v1 po/*.po | egrep '^\?|^.\?' | cut -c4-) -printf "%s" "$new_po_files" \ -| while read nfile ; do +new_po_files=$(git status --porcelain=v1 po/*.po | egrep '^(\?|.\?|A)' | cut -c4-) +for nfile in $new_po_files ; do run "git add" "$nfile" r=$? handle_po "$nfile" "Add new" "for" @@ -128,7 +127,7 @@ if [ -n "$new_po_files" ] ; then printf " %s" "$j" done printf '\n' - rc=3 + if [ $rc -eq 0 ] ; then rc=3 ; fi fi exit $rc |