[PATCH 1/1] Add .gitignore and script to manage .po files

Alan Dunn amdunn at google.com
Fri Feb 12 09:49:53 AEDT 2016


It is much easier to track one's changes (i.e., added files) to
Petitboot without all of the generated files being marked as
untracked.  In this commit I add a .gitignore file and script to mark
the .po files that are changed by the setup process as unchanged.
This way, there are no untracked generated files from the setup and
compilation process all the way through "make" and "make check".

Tested:
 In a clean copy of the repository after this change, I ran:
  ./bootstrap
  ./configure --without-twin-x11 --without-twin-fbdev
  make
  make check
  ./manage_unchanged.sh

 and then saw no untracked files.

Signed-off-by: Alan Dunn <amdunn at google.com>
---
 .gitignore          | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 manage_unchanged.sh | 22 ++++++++++++++++++
 2 files changed, 89 insertions(+)
 create mode 100644 .gitignore
 create mode 100755 manage_unchanged.sh

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..39f0d28
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,67 @@
+# Petitboot generated files
+/discover/grub2/grub2-lexer.[ch]
+/discover/grub2/grub2-parser.[ch]
+
+# Petitboot binaries
+/discover/pb-discover
+/ui/ncurses/petitboot-nc
+/utils/pb-config
+/utils/pb-event
+
+# Libtool generated files
+*.lo
+*.la
+**/.libs/
+
+# Autotools generated files
+**/.deps/
+.dirstamp
+
+/ABOUT-NLS
+/Makefile
+/Makefile.in
+/aclocal.m4
+/autom4te.cache/
+/compile
+/config.*
+/configure
+/depcomp
+/install-sh
+/libtool
+/ltmain.sh
+/m4/
+-/m4/ax_with_curses.m4
+-/m4/ax_with_curses_extra.m4
+/missing
+/stamp-h1
+/ylwrap
+
+# Gettext
+/po/*.po~
+/po/Makefile*
+/po/Makevars.template
+/po/*.gmo
+/po/*.sin
+/po/*.sed
+/po/POTFILES
+/po/Rules-quot
+/po/en at boldquot.header
+/po/en at quot.header
+/po/petitboot.pot
+/po/stamp-po
+
+# Tests
+*.log
+*.trs
+/test-driver
+## Test binaries
+/test/lib/list-test
+/test/urls/parse-url
+/test/urls/run-url-test
+/test/**/test*
+-/test/**/test*.c
+/ui/test/discover-test
+
+# Compiled files
+*.o
+*.ro
diff --git a/manage_unchanged.sh b/manage_unchanged.sh
new file mode 100755
index 0000000..15b510e
--- /dev/null
+++ b/manage_unchanged.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# There are some files in this repository that the setup process
+# changes, and the changes should not be tracked by git.  This script
+# causes git to ignore or unignore changes to those files.  The later
+# is necessary in the case that the files change upstream.  The script
+# is designed to be run in the directory it is in.  For usage, see the
+# usage message below.
+
+FILES=po/*.po
+DIRECTION=${1:-1}
+
+if [ "$DIRECTION" = 1 ]; then
+  GIT_FLAG=--assume-unchanged
+elif [ "$DIRECTION" = 0 ]; then
+  GIT_FLAG=--no-assume-unchanged
+else
+  echo "Usage: $0 [1 to ignore files, 0 to unignore files, default 1]"
+  exit 1
+fi
+
+git update-index $GIT_FLAG $FILES
-- 
2.7.0.rc3.207.g0ac5344



More information about the Petitboot mailing list