]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tools/git-tp-sync: update also po-man
authorKarel Zak <kzak@redhat.com>
Thu, 6 Mar 2025 09:39:15 +0000 (10:39 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 6 Mar 2025 09:39:15 +0000 (10:39 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
tools/git-tp-sync

index 6ae10a153a5871c2ea4e44cee12c4febe8e43327..dde2cb7fbc2e0a46efadda60cebc329b11ee4883 100755 (executable)
@@ -174,13 +174,21 @@ function update_project {
 function regenerate_po_files {
        local PODIR="$1"
 
-       if [ ! -f "${PODIR}/Makefile" ]; then
+       if [ "$PODIR" = "po" ]; then
+               if [  "${PODIR}/Makefile" ]; then
+                       return;
+               else
+                       echo "== Updating $PODIR (be patient) =="
+                       make -C $PODIR update-po &> /dev/null
+               fi
+       elif [ "$PODIR" = "po-man" ]; then
+               echo "== Updating $PODIR (be patient) =="
+               make gen-poman-dist
+       else
+               echo "Unsupported $PODIR directory (skip update)"
                return;
        fi
 
-       echo "== Updating $PODIR (be patient) =="
-       make -C $PODIR update-po &> /dev/null
-
        # ignore files where is only modified one line ("POT-Creation-Date")
        PO_IGNORE=$(git diff --numstat  $PODIR/*.po | gawk -v ORS=" " '/1[[:blank:]]1[[:blank:]]/ { print $3 }')
        if [ -n "$PO_IGNORE" ]; then
@@ -195,7 +203,7 @@ function regenerate_po_files {
                fi
        fi
 
-       git checkout -f "$PODIR"/ &> /dev/null
+       git checkout -f "$PODIR" &> /dev/null
 }
 
 for d in "${DIRS[@]}"; do