texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[8381] Prepare for distribution


From: gavinsmith0123
Subject: [8381] Prepare for distribution
Date: Tue, 23 Oct 2018 09:11:31 -0400 (EDT)

Revision: 8381
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=8381
Author:   gavin
Date:     2018-10-23 09:11:30 -0400 (Tue, 23 Oct 2018)
Log Message:
-----------
Prepare for distribution

* Makefile.am: Distribute more files.
* texi2any-js.in: Implement --help and --version.

Modified Paths:
--------------
    trunk/js/Makefile.am
    trunk/js/texi2any-js.in

Modified: trunk/js/Makefile.am
===================================================================
--- trunk/js/Makefile.am        2018-10-23 12:18:05 UTC (rev 8380)
+++ trunk/js/Makefile.am        2018-10-23 13:11:30 UTC (rev 8381)
@@ -61,6 +61,14 @@
        sed -e 's,@pkgdatadir@,'$(pkgdatadir)',g' $(srcdir)/texi2any-js.in >$@
        chmod a+x $@
 
+EXTRA_DIST += HACKING README TODO \
+             build-aux/eslint.json \
+             build-aux/modernizr.json \
+             modernizr.js \
+             package.json \
+             server.js \
+             tsconfig.json \
+             yarn.lock
 
 ## ---------- ##
 ## Examples.  ##

Modified: trunk/js/texi2any-js.in
===================================================================
--- trunk/js/texi2any-js.in     2018-10-23 12:18:05 UTC (rev 8380)
+++ trunk/js/texi2any-js.in     2018-10-23 13:11:30 UTC (rev 8381)
@@ -16,6 +16,64 @@
 # You should have received a copy of the GNU General Public License
 # along with GNU Texinfo.  If not, see <http://www.gnu.org/licenses/>.
 
+# option parsing
+
+version () {
+  cat <<EOF
+texi2any-js 0.0.90
+
+Copyright (C) 2018 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+    exit 0
+}
+
+help () {
+  cat <<EOF
+Usage: texi2any-js MANUAL [texi2any options]"
+
+Run texi2any on MANUAL, adding a JavaScript browsing interface.  Any
+extra options are passed through to texi2any.
+
+Report bugs to address@hidden,
+GNU Texinfo home page: <http://www.gnu.org/software/texinfo/>
+General help using GNU software: <http://www.gnu.org/gethelp/>
+EOF
+
+}
+
+manual=
+
+while test x"$1" != x ; do
+  case $1 in
+    --version)
+      version
+      exit 0
+      ;;
+    --help)
+      help
+      exit 0
+      ;;
+    -*)
+      echo "unknown option -$1"
+      exit 1 ;;
+    *)
+      manual=$1
+      shift
+      break ;;
+  esac
+  shift
+done
+
+if test x$manual = x; then
+  help
+  exit 1
+fi
+
+makeinfo_flags=$@
+
 MAKEINFO=${MAKEINFO:-texi2any}
 
 # substituted by Makefile
@@ -30,14 +88,6 @@
 <script src="info.js" type="text/javascript"></script>
 '
 
-if test $# -lt 1 ; then
-  echo "usage: $0 manual"
-  exit 1
-fi
-
-manual=$1 ; shift
-makeinfo_flags=$@
-
 js_scripts="$pkgdatadir/modernizr.js $pkgdatadir/info.js"
 for f in $js_scripts ; do
   if ! test -f $f ; then




reply via email to

[Prev in Thread] Current Thread [Next in Thread]