diff options
-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 |