jq @VERSION@ for Mac OS X 10.4 Tiger

jq @VERSION@, the command-line JSON processor by Stephen Dolan and the jq
maintainers, built for Mac OS X 10.4 on every Mac that runs it: PowerPC
(G3, G4 and G5) and Intel. It is one universal program, with its own
Oniguruma (regular expressions) and decNumber (exact numbers) inside. It
needs nothing that Tiger does not have:

  /usr/local/bin/jq
      jq @VERSION@
  /usr/local/share/man/man1/jq.1
      its manual page
  /usr/local/share/doc/jq-tiger
      this Read Me, jq's README and licenses, update-shell-profile.sh

Using it

The installer adds /usr/local/bin to the PATH in your shell profile
(~/.bash_profile for bash, the shell Tiger gives new accounts, or the
.bash_login or .profile you already have) and keeps the old profile beside
it as .jqsave. Open a new Terminal window and give jq a filter and some
JSON.

  jq . data.json
      the file, indented and in colour
  jq '.items[] | .name' data.json
      the name of each item
  jq -r '.packages[].id'
      each id as plain text, from what jq reads on its input
  jq -n '[range(5)] | add'
      no input: 10

With curl from tiger.v2core.com, which reaches today's HTTPS sites:

  curl -s https://tiger.v2core.com/packages.json | jq '.packages | length'

man jq is the whole manual, and jq --help gives the options.

Modules

jq reads ~/.jq at the start, if there is one, and finds modules for
import and include in ~/.jq, $ORIGIN/../lib/jq and $ORIGIN/../lib. Tiger's
realpath() stops a program when it is given no buffer, and jq gives it
none for each path that does not exist: so every jq program stopped there.
This build gives realpath() a buffer of its own in that case.

Uninstalling

In Terminal:

  sudo rm /usr/local/bin/jq
  sudo rm /usr/local/share/man/man1/jq.1
  sudo rm -rf /usr/local/share/doc/jq-tiger
  sudo rm -rf "/Library/Receipts/jq @VERSION@.pkg"

If nothing else you use is in /usr/local/bin, take the "Setting PATH for
jq" lines out of your shell profile.

How it was made

jq was cross-compiled on Linux with GCC 13.4 for powerpc-apple-darwin8 (any
G3 and up) and i686-apple-darwin8, against the Mac OS X 10.4u SDK. Its
source is not changed: one small header goes before each of its files for
realpath(). jq loads only Tiger's libSystem. The package and this disk
image were made on Mac OS X 10.4.11 with its own mkbom, pax and hdiutil.

Everything it was built from (jq's release, with its Oniguruma and
decNumber, the header and the build scripts) is in
jq-@VERSION@-tiger-source.tar.gz, beside this disk image.

Built @DATE@.
