|
|
b82361 |
diff --git a/build.xml b/build.xml
|
|
|
b82361 |
index ae00108..35cbfee 100644
|
|
|
b82361 |
--- a/build.xml
|
|
|
b82361 |
+++ b/build.xml
|
|
|
b82361 |
@@ -171,6 +171,13 @@
|
|
|
b82361 |
</copy>
|
|
|
b82361 |
</target>
|
|
|
b82361 |
|
|
|
b82361 |
+ <target name="copy-manpage" depends="init">
|
|
|
b82361 |
+ <mkdir dir="${dist.dir}/man"/>
|
|
|
b82361 |
+ <copy todir="${dist.dir}/man">
|
|
|
b82361 |
+ <fileset dir="man"/>
|
|
|
b82361 |
+ </copy>
|
|
|
b82361 |
+ </target>
|
|
|
b82361 |
+
|
|
|
b82361 |
<target name="copy-misc" depends="init">
|
|
|
b82361 |
<filter token="datestamp" value="${TODAY}"/>
|
|
|
b82361 |
<copy todir="${dist.dir}" filtering="yes">
|
|
|
b82361 |
@@ -182,7 +189,7 @@
|
|
|
b82361 |
</copy>
|
|
|
b82361 |
</target>
|
|
|
b82361 |
|
|
|
b82361 |
- <target name="copy-all" depends="copy-source,copy-examples,copy-misc">
|
|
|
b82361 |
+ <target name="copy-all" depends="copy-source,copy-examples,copy-manpage,copy-misc">
|
|
|
b82361 |
</target>
|
|
|
b82361 |
|
|
|
b82361 |
<target name="javadoc" depends="init">
|
|
|
b82361 |
diff --git a/man/rhino.1 b/man/rhino.1
|
|
|
b82361 |
new file mode 100644
|
|
|
b82361 |
index 0000000..e04a8df
|
|
|
b82361 |
--- /dev/null
|
|
|
b82361 |
+++ b/man/rhino.1
|
|
|
b82361 |
@@ -0,0 +1,117 @@
|
|
|
b82361 |
+.\" Hey, EMACS: -*- nroff -*-
|
|
|
b82361 |
+.\" First parameter, NAME, should be all caps
|
|
|
b82361 |
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
|
|
b82361 |
+.\" other parameters are allowed: see man(7), man(1)
|
|
|
b82361 |
+.TH RHINO 1 "September 09, 2013"
|
|
|
b82361 |
+.\" Please adjust this date whenever revising the manpage.
|
|
|
b82361 |
+.\"
|
|
|
b82361 |
+.\" Some roff macros, for reference:
|
|
|
b82361 |
+.\" .nh disable hyphenation
|
|
|
b82361 |
+.\" .hy enable hyphenation
|
|
|
b82361 |
+.\" .ad l left justify
|
|
|
b82361 |
+.\" .ad b justify to both left and right margins
|
|
|
b82361 |
+.\" .nf disable filling
|
|
|
b82361 |
+.\" .fi enable filling
|
|
|
b82361 |
+.\" .br insert line break
|
|
|
b82361 |
+.\" .sp <n> insert n+1 empty lines
|
|
|
b82361 |
+.\" for manpage-specific macros, see man(7)
|
|
|
b82361 |
+.SH NAME
|
|
|
b82361 |
+rhino \- invokes the JavaScript shell for running scripts in batch mode or interactive
|
|
|
b82361 |
+
|
|
|
b82361 |
+.SH SYNOPSIS
|
|
|
b82361 |
+.B rhino
|
|
|
b82361 |
+.I [options]
|
|
|
b82361 |
+.I script_filename_or_url
|
|
|
b82361 |
+.I [script_arguments]
|
|
|
b82361 |
+
|
|
|
b82361 |
+.SH DESCRIPTION
|
|
|
b82361 |
+This manual page documents briefly the
|
|
|
b82361 |
+.B rhino
|
|
|
b82361 |
+command.
|
|
|
b82361 |
+.PP
|
|
|
b82361 |
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
|
|
b82361 |
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
|
|
b82361 |
+.\" respectively.
|
|
|
b82361 |
+\fBrhino\fP is a start script for the rhino JavaScript shell which provides a simple way
|
|
|
b82361 |
+to run scripts in batch mode or an interactive environment for exploratory programming.
|
|
|
b82361 |
+
|
|
|
b82361 |
+.SH OPTIONS
|
|
|
b82361 |
+
|
|
|
b82361 |
+.IP -?,\ -help
|
|
|
b82361 |
+Displays help messages.
|
|
|
b82361 |
+.IP -w
|
|
|
b82361 |
+Enable warnings.
|
|
|
b82361 |
+.IP -e\ \fIscript_source\fP
|
|
|
b82361 |
+Executes script_source as a JavaScript script.
|
|
|
b82361 |
+.IP -f\ \fIscript_filename_or_url\fP
|
|
|
b82361 |
+Reads script_filename_or_url content and execute it as a JavaScript script.
|
|
|
b82361 |
+.IP -opt,\ -O\ \fIoptLevel\fP
|
|
|
b82361 |
+Optimizes at level optLevel, which must be an integer between 0 and 9.
|
|
|
b82361 |
+.IP -version\ \fIversionNumber\fP
|
|
|
b82361 |
+Specifies the language version to compile with. The string versionNumber must be one of 100, 110, 120, 130, 140, 150, 160, 170 or 180. See JavaScript Language Versions for more information on language versions.
|
|
|
b82361 |
+.IP -modules\ \fIuri\fP
|
|
|
b82361 |
+Add a single path or URL element to the CommonJS module search path. (implies -require)
|
|
|
b82361 |
+.IP -require
|
|
|
b82361 |
+Enable CommonJS module support.
|
|
|
b82361 |
+.IP -sandbox
|
|
|
b82361 |
+Enable CommonJS sandbox mode. (implies -require)
|
|
|
b82361 |
+.IP -debug
|
|
|
b82361 |
+Generate debug code.
|
|
|
b82361 |
+.IP -strict
|
|
|
b82361 |
+Enable strict mode warnings.
|
|
|
b82361 |
+.IP -fatal-warnings
|
|
|
b82361 |
+Treat warnings as errors.
|
|
|
b82361 |
+.IP -encoding\ \fIcharset\fP
|
|
|
b82361 |
+Use specified character encoding as default when reading scripts.
|
|
|
b82361 |
+
|
|
|
b82361 |
+.SH PREDEFINED PROPERTIES
|
|
|
b82361 |
+
|
|
|
b82361 |
+Scripts executing in the shell have access to some additional properties of the top-level object.
|
|
|
b82361 |
+
|
|
|
b82361 |
+.IP arguments
|
|
|
b82361 |
+The arguments object is an array containing the strings of all the arguments given at the command line when the shell was invoked.
|
|
|
b82361 |
+.IP environment
|
|
|
b82361 |
+Returns the current environment object.
|
|
|
b82361 |
+.IP history
|
|
|
b82361 |
+Displays the shell command history.
|
|
|
b82361 |
+.IP help()
|
|
|
b82361 |
+Executing the help function will print usage and help messages.
|
|
|
b82361 |
+.IP defineClass(\fIclassName\fP)
|
|
|
b82361 |
+Define an extension using the Java class named with the string argument className. Uses ScriptableObject.defineClass() to define the extension.
|
|
|
b82361 |
+.IP deserialize(\fIfilename\fP)
|
|
|
b82361 |
+Restore from the specified file an object previously written by a call to serialize.
|
|
|
b82361 |
+.IP gc()
|
|
|
b82361 |
+Runs the garbage collector.
|
|
|
b82361 |
+.IP load(\fI[filename,\&.\&.\&.]\fP)
|
|
|
b82361 |
+Load JavaScript source files named by string arguments. If multiple arguments are given, each file is read in and executed in turn.
|
|
|
b82361 |
+.IP loadClass(\fIclassName\fP)
|
|
|
b82361 |
+Load and execute the class named by the string argument className. The class must be a class that implements the Script interface, as will any script compiled by jsc.
|
|
|
b82361 |
+.IP print(\fI[expr\&.\&.\&.]\fP)
|
|
|
b82361 |
+Evaluate and print expressions. Evaluates each expression, converts the result to a string, and prints it.
|
|
|
b82361 |
+.IP readFile(\fIpath[,characterCoding]\fP)
|
|
|
b82361 |
+Read given file and convert its bytes to a string using the specified character coding or default character coding if explicit coding argument is not given.
|
|
|
b82361 |
+.IP readUrl(\fIurl[,characterCoding]\fP)
|
|
|
b82361 |
+Open an input connection to the given string url, read all its bytes and convert them to a string using the specified character coding or default character coding if explicit coding argument is not given.
|
|
|
b82361 |
+.IP runCommand(\fIcommandName,[arg,\&.\&.\&.][options]\fP)
|
|
|
b82361 |
+Execute the specified command with the given argument and options as a separate process and return the exit status of the process. For details, see JavaDoc for org.mozilla.javascript.tools.shell.Global#runCommand.
|
|
|
b82361 |
+.IP seal(\fIobject\fP)
|
|
|
b82361 |
+Seal the specified object so any attempt to add, delete or modify its properties would throw an exception.
|
|
|
b82361 |
+.IP serialize(\fIobject,filename\fP)
|
|
|
b82361 |
+Serialize the given object to the specified file.
|
|
|
b82361 |
+.IP spawn(\fIfunctionOrScript\fP)
|
|
|
b82361 |
+Run the given function or script in a different thread.
|
|
|
b82361 |
+.IP sync(\fIfunction\fP)
|
|
|
b82361 |
+creates a synchronized function (in the sense of a Java synchronized method) from an existing function. The new function synchronizes on the this object of its invocation.
|
|
|
b82361 |
+.IP quit()
|
|
|
b82361 |
+Quit shell. The shell will also quit in interactive mode if an end-of-file character is typed at the prompt.
|
|
|
b82361 |
+.IP version(\fI[number]\fP)
|
|
|
b82361 |
+Get or set JavaScript version number. If no argument is supplied, the current version number is returned. If an argument is supplied, it is expected to be one of 100, 110, 120, 130, 140, 150, 160, 170 or 180 to indicate JavaScript version 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 or 1.8 respectively.
|
|
|
b82361 |
+
|
|
|
b82361 |
+.SH SEE ALSO
|
|
|
b82361 |
+The online documentation under
|
|
|
b82361 |
+.UR http://www.mozilla.org/rhino/shell.html
|
|
|
b82361 |
+.I http://www.mozilla.org/rhino/shell.html
|
|
|
b82361 |
+.UE
|
|
|
b82361 |
+
|
|
|
b82361 |
+.SH AUTHOR
|
|
|
b82361 |
+This manual page was written by Wolfgang Baer <WBaer@gmx.de>, with modifications by Elliott Baron <ebaron@redhat.com>.
|