fixTexts.sh: Add --reset option

develop
lethosor 2015-06-15 13:47:03 -04:00
parent 8145a04944
commit bba85299ea
1 changed files with 6 additions and 1 deletions

@ -2,11 +2,14 @@
# regenerate documentation after editing the .rst files. Requires python and docutils. # regenerate documentation after editing the .rst files. Requires python and docutils.
force= force=
reset=
while [ $# -gt 0 ] while [ $# -gt 0 ]
do do
case "$1" in case "$1" in
--force) force=1 --force) force=1
;; ;;
--reset) reset=1
;;
esac esac
shift shift
done done
@ -32,7 +35,9 @@ cd `dirname $0`
status=0 status=0
function process() { 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... " echo -n "Updating $2... "
if "$rst2html" --no-generator --no-datestamp "$1" "$2"; then if "$rst2html" --no-generator --no-datestamp "$1" "$2"; then
echo "Done" echo "Done"