Skip to content

Commit

Permalink
find and fix commands unintentionally changed in translation
Browse files Browse the repository at this point in the history
Dump the commands with the new "dump-commands" target and compare.
  • Loading branch information
xry111 committed Sep 18, 2022
1 parent 2eb56b9 commit fc65a88
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ po4a.cfg
po4a-changelog.cfg
.*.swp
.*.swo
cmd
40 changes: 40 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,43 @@ $(MLANG)/book/git-version.sh.orig: $(LFS_EN)/git-version.sh
sed -e "2i export GIT_DIR=$(PWD)/lfs-en/.git" \
-e "s/\[ .*trunk.* \]/true/" \
-i $@

# The following targets are used for checking any unintentionally command
# changes.

KNOWN_DIFF = chapter09/*-symlinks \
chapter09/*-network \
chapter09/*-profile \
chapter09/*-console \
chapter09/*-locale \
chapter10/*-fstab

cmd/en/sysv/stamp: $(XML_FILES)
make -C lfs-en DUMPDIR="$(PWD)/$(@D)" REV=sysv dump-commands
cd $(@D); rm -f $(KNOWN_DIFF)
touch $@

cmd/en/systemd/stamp: $(XML_FILES)
make -C lfs-en DUMPDIR="$(PWD)/$(@D)" REV=systemd dump-commands
cd $(@D); rm -f $(KNOWN_DIFF)
touch $@

cmd/$(MLANG)/sysv/stamp: $(MXML_FILES)
make -C $(MLANG)/book DUMPDIR="$(PWD)/$(@D)" REV=sysv dump-commands
cd $(@D); rm -f $(KNOWN_DIFF)
touch $@

cmd/$(MLANG)/systemd/stamp: $(MXML_FILES)
make -C $(MLANG)/book DUMPDIR="$(PWD)/$(@D)" REV=systemd dump-commands
cd $(@D); rm -f $(KNOWN_DIFF)
touch $@

.PHONY: check-cmd check-cmd-sysv check-cmd-systemd

check-cmd-sysv: cmd/en/sysv/stamp cmd/$(MLANG)/sysv/stamp
diff $(^D) -Naur

check-cmd-systemd: cmd/en/systemd/stamp cmd/$(MLANG)/systemd/stamp
diff $(^D) -Naur

check-cmd: check-cmd-sysv check-cmd-systemd
4 changes: 2 additions & 2 deletions zh_CN/chapter06/findutils.po
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ msgid ""
" --host=$LFS_TGT \\\n"
" --build=$(build-aux/config.guess)</userinput>"
msgstr ""
"<userinput remap=\"configure\">./configure --prefix=/usr \\\n"
"<userinput remap=\"configure\">./configure --prefix=/usr \\\n"
" --localstatedir=/var/lib/locate \\\n"
" --host=$LFS_TGT \\\n"
" --host=$LFS_TGT \\\n"
" --build=$(build-aux/config.guess)</userinput>"

#. type: Content of: <sect1><sect2><para>
Expand Down
2 changes: 1 addition & 1 deletion zh_CN/chapter07/chroot.po
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ msgstr ""
" HOME=/root \\\n"
" TERM=\"$TERM\" \\\n"
" PS1='(lfs chroot) \\u:\\w\\$ ' \\\n"
" PATH=/usr/bin:/usr/sbin \\\n"
" PATH=/usr/bin:/usr/sbin \\\n"
" /bin/bash --login</userinput>"

#. type: Content of: <sect1><para>
Expand Down

0 comments on commit fc65a88

Please sign in to comment.