From bba85299ea308edfb0da4bc3edf331a935238a5a Mon Sep 17 00:00:00 2001 From: lethosor Date: Mon, 15 Jun 2015 13:47:03 -0400 Subject: [PATCH] fixTexts.sh: Add --reset option --- fixTexts.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fixTexts.sh b/fixTexts.sh index aeef9f0f5..4d025121b 100755 --- a/fixTexts.sh +++ b/fixTexts.sh @@ -2,11 +2,14 @@ # regenerate documentation after editing the .rst files. Requires python and docutils. force= +reset= while [ $# -gt 0 ] do case "$1" in --force) force=1 ;; + --reset) reset=1 + ;; esac shift done @@ -32,7 +35,9 @@ cd `dirname $0` status=0 function process() { - if [ "$1" -nt "$2" ] || [ -n "$force" ]; then + if [ -n "$reset" ]; then + git checkout -- "$2" + elif [ "$1" -nt "$2" ] || [ -n "$force" ]; then echo -n "Updating $2... " if "$rst2html" --no-generator --no-datestamp "$1" "$2"; then echo "Done"