[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun doc/gnun.texi gnun...
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun doc/gnun.texi gnun... |
Date: |
Fri, 21 Oct 2011 11:46:06 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 11/10/21 11:46:06
Modified files:
gnun/server/gnun/doc: gnun.texi
gnun/server/gnun: gnun-validate-html.in gnun-validate-html NEWS
ChangeLog
Log message:
Support checking from arbitrary directory via --root option
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/doc/gnun.texi?cvsroot=trans-coord&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-validate-html.in?cvsroot=trans-coord&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-validate-html?cvsroot=trans-coord&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.207&r2=1.208
Patches:
Index: doc/gnun.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/gnun.texi,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- doc/gnun.texi 2 Jul 2011 08:41:21 -0000 1.26
+++ doc/gnun.texi 21 Oct 2011 11:46:05 -0000 1.27
@@ -1695,7 +1695,7 @@
valid by running
@example
-gnun-validate-html philosophy/not-ipr.html
+gnun-validate-html --root . philosophy/not-ipr.html
@end example
@xref{gnun-validate-html}, for more information.
@@ -1838,11 +1838,14 @@
GNUN enforces XHTML validation at build time if invoked with
@code{VALIDATE=yes}.
-The script expects only one @var{file} as an argument and will exit
+The script expects only one @var{file} as the last argument and will exit
with an error if it is not specified (which might be the case when an
automatic variable is not expanded properly due to a bug in the
makefile).
+The top of the working directory can be specified through --root option;
+the default value is ``../..''.
+
@node mailfail
@subsection The @command{mailfail} Script
@cindex mail, notifications
Index: gnun-validate-html.in
===================================================================
RCS file:
/sources/trans-coord/trans-coord/gnun/server/gnun/gnun-validate-html.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- gnun-validate-html.in 22 Aug 2011 14:45:04 -0000 1.11
+++ gnun-validate-html.in 21 Oct 2011 11:46:05 -0000 1.12
@@ -29,11 +29,12 @@
function usage () {
cat <<EOF
-Usage: gnun-validate-html OPTION | FILE
+Usage: gnun-validate-html OPTION... FILE
Options:
- --version Just print version info and return
- --help Print this usage information message
+ --root=DIRECTORY Specify top directory for working copy
+ --version Display version info and exit
+ --help Display this help and exit
Report bugs to @PACKAGE_BUGREPORT@
@PACKAGE_NAME@ home page: <@PACKAGE_URL@>
@@ -44,7 +45,11 @@
set -e
set -o pipefail
-case "$1" in
+params=$#
+ROOT=../..
+
+while [ ${params} -gt 1 ]; do
+ case "$1" in
--help )
usage
exit 0
@@ -53,16 +58,32 @@
version
exit 0
;;
+ --root )
+ shift
+ params=$((${params}-1))
+ ROOT="$1"
+ ;;
+ --root=* )
+ ROOT="${1#--root=}"
+ ;;
* )
+ break
;;
-esac
+ esac
+ params=$((${params}-1))
+ shift
+done
-if [ $# -ne 1 ]; then
- echo 1>&2 Error: FILE argument is required. See --help for details.
+if [ ${params} -ne 1 ]; then
+ echo 1>&2 Error: Single FILE argument is required. See --help for details.
+ exit 1
+fi
+
+if [ ! -d "${ROOT}" ]; then
+ echo 1>&2 Error: Root directory \`${ROOT}\' doesn\'t exist.
exit 1
fi
-ROOT=../..
address@hidden@
# Create two tempfiles and mark them for deletion on exit.
@@ -76,7 +97,10 @@
# Limitations: CGI includes would be expanded in a wrong way
BEGIN {
relative_dir_name = ARGV[1];
+ if (relative_dir_name ~ /\//)
sub (/[^\/]*$/, "", relative_dir_name);
+ else
+ relative_dir_name="./"
sub (/\/*$/, "/", relative_dir_name);
}
Index: gnun-validate-html
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/gnun-validate-html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- gnun-validate-html 22 Aug 2011 15:30:52 -0000 1.12
+++ gnun-validate-html 21 Oct 2011 11:46:06 -0000 1.13
@@ -29,11 +29,12 @@
function usage () {
cat <<EOF
-Usage: gnun-validate-html OPTION | FILE
+Usage: gnun-validate-html OPTION... FILE
Options:
- --version Just print version info and return
- --help Print this usage information message
+ --root=DIRECTORY Specify top directory for working copy
+ --version Display version info and exit
+ --help Display this help and exit
Report bugs to address@hidden
GNUnited Nations home page: <http://www.gnu.org/software/gnun/>
@@ -44,7 +45,11 @@
set -e
set -o pipefail
-case "$1" in
+params=$#
+ROOT=../..
+
+while [ ${params} -gt 1 ]; do
+ case "$1" in
--help )
usage
exit 0
@@ -53,16 +58,32 @@
version
exit 0
;;
+ --root )
+ shift
+ params=$((${params}-1))
+ ROOT="$1"
+ ;;
+ --root=* )
+ ROOT="${1#--root=}"
+ ;;
* )
+ break
;;
-esac
+ esac
+ params=$((${params}-1))
+ shift
+done
-if [ $# -ne 1 ]; then
- echo 1>&2 Error: FILE argument is required. See --help for details.
+if [ ${params} -ne 1 ]; then
+ echo 1>&2 Error: Single FILE argument is required. See --help for details.
+ exit 1
+fi
+
+if [ ! -d "${ROOT}" ]; then
+ echo 1>&2 Error: Root directory \`${ROOT}\' doesn\'t exist.
exit 1
fi
-ROOT=../..
DTD=dtd
# Create two tempfiles and mark them for deletion on exit.
Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- NEWS 20 Sep 2011 04:17:34 -0000 1.34
+++ NEWS 21 Oct 2011 11:46:06 -0000 1.35
@@ -17,6 +17,9 @@
them against a custom DTD; this should eliminate need
for `no-validate-articles' variable.
+** `gnun-validate-html' can be invoked from arbitrary directory
+ using --root option.
+
** GNU Bzr is a supported VCS.
** New GNUmakefile.team targets: format, publish, clean.
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -b -r1.207 -r1.208
--- ChangeLog 27 Sep 2011 10:03:46 -0000 1.207
+++ ChangeLog 21 Oct 2011 11:46:06 -0000 1.208
@@ -1,3 +1,8 @@
+2011-10-21 Pavel Kharitonov <address@hidden>
+
+ * gnun-validate-html.in: Support checking from arbitrary
+ directory via --root option.
+
2011-09-27 Pavel Kharitonov <address@hidden>
* GNUmakefile (home-rules): Fix `extract-outdated-date'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- trans-coord/gnun/server/gnun doc/gnun.texi gnun...,
Pavel Kharitonov <=