Merge branch 'gash'
This commit brings in the entire history of the Gash project. There are a few conflicts, which are explained below. * .dir-locals.el: Combine both files. * .gitignore: Combine both files. * COPYING: Use the Geesh version with HTTPS URLs. * README: Use the Gash README. * guix.scm: Use the Geesh package definition (the Gash one is preserved in gash.guix.scm).
This commit is contained in:
commit
23e53f4e49
|
@ -1,6 +1,17 @@
|
|||
((scheme-mode
|
||||
((nil
|
||||
.
|
||||
((eval . (put '<sh-case> 'scheme-indent-function 1))
|
||||
((indent-tabs-mode . nil)))
|
||||
(makefile-mode
|
||||
(indent-tabs-mode . t))
|
||||
(scheme-mode
|
||||
.
|
||||
((geiser-active-implementations . (guile))
|
||||
(eval
|
||||
.
|
||||
(progn
|
||||
(let ((top (locate-dominating-file default-directory ".dir-locals.el")))
|
||||
(add-to-list 'geiser-guile-load-path top))))
|
||||
(eval . (put '<sh-case> 'scheme-indent-function 1))
|
||||
(eval . (put '<sh-defun> 'scheme-indent-function 1))
|
||||
(eval . (put '<sh-exec-let> 'scheme-indent-function 1))
|
||||
(eval . (put '<sh-for> 'scheme-indent-function 1))
|
||||
|
|
|
@ -1,21 +1,58 @@
|
|||
*.go
|
||||
*.log
|
||||
*~
|
||||
/.config.make
|
||||
/bin/basename
|
||||
/bin/bash
|
||||
/bin/cat
|
||||
/bin/chmod
|
||||
/bin/compress
|
||||
/bin/cp
|
||||
/bin/dirname
|
||||
/bin/find
|
||||
/bin/gash
|
||||
/bin/grep
|
||||
/bin/ls
|
||||
/bin/mkdir
|
||||
/bin/mv
|
||||
/bin/reboot
|
||||
/bin/rm
|
||||
/bin/rmdir
|
||||
/bin/sed
|
||||
/bin/sh
|
||||
/bin/tar
|
||||
/bin/touch
|
||||
/bin/tr
|
||||
/bin/wc
|
||||
/bin/which
|
||||
/doc/version.texi
|
||||
/gash/config.scm
|
||||
/pre-inst-env
|
||||
/test/*.1
|
||||
/test/*.2
|
||||
/test/*.log
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache/*
|
||||
build-aux/*
|
||||
!build-aux/build-guile.sh
|
||||
!build-aux/git-version-gen
|
||||
!build-aux/gitlab-ci.yml
|
||||
!build-aux/pre-inst-env.in
|
||||
!build-aux/trace.sh
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
|
||||
# Preserve this Gash file for now.
|
||||
# configure
|
||||
|
||||
coverage/*
|
||||
lcov.info
|
||||
pre-inst-env
|
||||
scripts/geesh
|
||||
tests/unit/*.trs
|
||||
tests/unit/config.scm
|
||||
tests/spec/oil
|
||||
tests/spec/oil-link
|
||||
tests/unit/*.trs
|
||||
tests/unit/config.scm
|
||||
tools/coverage
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
bar/
|
|
@ -0,0 +1 @@
|
|||
xxbar/xx
|
|
@ -0,0 +1,15 @@
|
|||
Rutger EW van Beusekom <rutger.van.beusekom@gmail.com>
|
||||
Main author
|
||||
All files except the imported files listed below
|
||||
|
||||
Adapted from GNU Guix
|
||||
gash/commands/*.scm
|
||||
gash/shell-utils.scm
|
||||
gash/guix-utils.scm
|
||||
|
||||
Adapted from Mes
|
||||
build-aux/build-guile.sh
|
||||
|
||||
Adapted from Guile100 Challenge
|
||||
gash/compress.scm
|
||||
gash/ustar.scm
|
|
@ -0,0 +1,23 @@
|
|||
Working up to a 0.1 release.
|
||||
|
||||
TODO:
|
||||
* Fix word/delim/substitute
|
||||
* Implement export
|
||||
* Pass all tests
|
||||
* Add missing tests, repeat :-)
|
||||
|
||||
Try
|
||||
|
||||
make check-bash
|
||||
make check-gash
|
||||
|
||||
or
|
||||
|
||||
bash -e test/42-sh-export.sh
|
||||
./pre-inst-env gash -e test/42-sh-export.sh
|
||||
|
||||
To use Geesh, assuming you have built it in ../geesh, do something like
|
||||
|
||||
GUILE_LOAD_PATH=../geesh:$GUILE_LOAD_PATH
|
||||
GUILE_LOAD_COMPILED_PATH=../geesh:$GUILE_LOAD_COMPILED_PATH
|
||||
./pre-inst-env gash --geesh -dd -p -c 'cat < README > bla'
|
|
@ -0,0 +1,29 @@
|
|||
-*- org -*-
|
||||
Building and Installing Gash
|
||||
|
||||
* Get it
|
||||
git clone https://gitlab.com/rutger.van.beusekom/gash
|
||||
|
||||
* Regular build
|
||||
** Prerequisites
|
||||
*** Guix
|
||||
guix environment -l guix.scm
|
||||
|
||||
*** Other GNU/Linux
|
||||
- [[https://gitlab.com/samplet/geesh][geesh]], 0.1-rc is known to work.
|
||||
- GNU Guile, version 2.2.3 or is known to work.
|
||||
- GNU make, version 4.2 known to work.
|
||||
- SH, /bin/sh, GNU Bash 4.3 is known to work.
|
||||
- git, 2.10 is known to work.
|
||||
|
||||
** Build it
|
||||
./configure
|
||||
make
|
||||
|
||||
** Check it
|
||||
make check
|
||||
** Install it
|
||||
make install
|
||||
|
||||
* Guix it
|
||||
guix package -f guix.scm
|
21
README
21
README
|
@ -1 +1,20 @@
|
|||
Geesh is a shell interpreter written in Guile Scheme.
|
||||
This project aims to produce at least a POSIX compliant sh replacement
|
||||
or even implement GNU bash. On top of that it also intends to make
|
||||
scheme available for interactive and scripting application. The
|
||||
approach also intends to allow capturing the intermediate scheme
|
||||
representation of the "original" shell script to offer a migration
|
||||
path away from [ba]sh. On top of this GNU make could similarly be
|
||||
replaced, as make turns out to be fraught with limitations and
|
||||
complexities. One of the features I personally desire is not be
|
||||
forced to keep doing what was done in the past, i.e. once an object
|
||||
file is produced, it does not have to be produced again as long as the
|
||||
original is kept around. The orignal must be replaced when any of its
|
||||
dependencies change (source, compiler options, linker, etc.)
|
||||
|
||||
I feel that the shell has been instrumental on my path to embracing
|
||||
functional programming, however now I mostly experience that the
|
||||
language itselfs folds on functional expression, pun intended.
|
||||
|
||||
|
||||
* history flattened vs full, i.e. navigate interactively without
|
||||
redundancy vs export as script
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
* setup test driven development: done
|
||||
* execute tests using gash: done
|
||||
* parsing posix shell: nested "'""'": done
|
||||
* globbing: done
|
||||
* job control: done
|
||||
* substitution: done
|
||||
* readline: prompt2: in progress
|
||||
* pipe: in progress: mix built-in with process
|
||||
* compound: case, while, until
|
||||
* expansion: done
|
||||
* alias:
|
||||
* iohere:
|
||||
* redirection:
|
||||
* posix compliance:
|
|
@ -0,0 +1,24 @@
|
|||
#! @GUILE@ \
|
||||
--no-auto-compile -e main -L @guile_site_dir@ -C @guile_site_ccache_dir@ -L . -C . -s
|
||||
!#
|
||||
;;; Gash --- Guile As SHell
|
||||
;;; Copyright © 2016,2017,2018 R.E.W. van Beusekom <rutger.van.beusekom@gmail.com>
|
||||
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of Gash.
|
||||
;;;
|
||||
;;; Gash is free software; you can redistribute it and/or modify it
|
||||
;;; under the terms of the GNU General Public License as published by
|
||||
;;; the Free Software Foundation; either version 3 of the License, or (at
|
||||
;;; your option) any later version.
|
||||
;;;
|
||||
;;; Gash is distributed in the hope that it will be useful, but
|
||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with Gash. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define (main args)
|
||||
(apply (@@ (gash commands @builtin@) main) args))
|
|
@ -0,0 +1,25 @@
|
|||
#! @GUILE@ \
|
||||
--no-auto-compile -e main -L @guile_site_dir@ -C @guile_site_ccache_dir@ -L . -C . -s
|
||||
!#
|
||||
;;; Gash --- Guile As SHell
|
||||
;;; Copyright © 2016,2017,2018 R.E.W. van Beusekom <rutger.van.beusekom@gmail.com>
|
||||
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of Gash.
|
||||
;;;
|
||||
;;; Gash is free software; you can redistribute it and/or modify it
|
||||
;;; under the terms of the GNU General Public License as published by
|
||||
;;; the Free Software Foundation; either version 3 of the License, or (at
|
||||
;;; your option) any later version.
|
||||
;;;
|
||||
;;; Gash is distributed in the hope that it will be useful, but
|
||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with Gash. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define (main args)
|
||||
(setenv "SHELL" ((compose canonicalize-path car command-line)))
|
||||
((@ (gash gash) main) (command-line)))
|
|
@ -0,0 +1,134 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Gash --- Guile As SHell
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of Gash.
|
||||
#
|
||||
# Gash is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# Gash is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Gash. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
srcdir=${srcdir-.}
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
|
||||
export GUILE
|
||||
export GUILE_AUTO_COMPILE
|
||||
GUILE=${GUILE-$(command -v guile)}
|
||||
GUILD=${GUILD-$(command -v guild || command -v guile-tools)}
|
||||
GUILE_AUTO_COMPILE=0
|
||||
|
||||
set -e
|
||||
|
||||
SCM_FILES="
|
||||
${srcdest}gash/bournish-commands.scm
|
||||
${srcdest}gash/guix-utils.scm
|
||||
${srcdest}gash/builtins.scm
|
||||
${srcdest}gash/compress.scm
|
||||
${srcdest}gash/config.scm
|
||||
${srcdest}gash/environment.scm
|
||||
${srcdest}gash/gash.scm
|
||||
${srcdest}gash/geesh.scm
|
||||
${srcdest}gash/grammar.scm
|
||||
${srcdest}gash/io.scm
|
||||
${srcdest}gash/job.scm
|
||||
${srcdest}gash/lzw.scm
|
||||
${srcdest}gash/pipe.scm
|
||||
${srcdest}gash/readline.scm
|
||||
${srcdest}gash/script.scm
|
||||
${srcdest}gash/shell-utils.scm
|
||||
${srcdest}gash/ustar.scm
|
||||
${srcdest}gash/util.scm
|
||||
|
||||
${srcdest}gash/peg.scm
|
||||
${srcdest}gash/peg/cache.scm
|
||||
${srcdest}gash/peg/codegen.scm
|
||||
${srcdest}gash/peg/simplify-tree.scm
|
||||
${srcdest}gash/peg/string-peg.scm
|
||||
${srcdest}gash/peg/using-parsers.scm
|
||||
|
||||
${srcdest}gash/commands/basename.scm
|
||||
${srcdest}gash/commands/cat.scm
|
||||
${srcdest}gash/commands/chmod.scm
|
||||
${srcdest}gash/commands/compress.scm
|
||||
${srcdest}gash/commands/cp.scm
|
||||
${srcdest}gash/commands/dirname.scm
|
||||
${srcdest}gash/commands/find.scm
|
||||
${srcdest}gash/commands/grep.scm
|
||||
${srcdest}gash/commands/ls.scm
|
||||
${srcdest}gash/commands/mkdir.scm
|
||||
${srcdest}gash/commands/mv.scm
|
||||
${srcdest}gash/commands/reboot.scm
|
||||
${srcdest}gash/commands/rm.scm
|
||||
${srcdest}gash/commands/rmdir.scm
|
||||
${srcdest}gash/commands/sed.scm
|
||||
${srcdest}gash/commands/tar.scm
|
||||
${srcdest}gash/commands/touch.scm
|
||||
${srcdest}gash/commands/tr.scm
|
||||
${srcdest}gash/commands/wc.scm
|
||||
${srcdest}gash/commands/which.scm
|
||||
|
||||
${srcdest}gash/commands/sed/reader.scm
|
||||
|
||||
"
|
||||
|
||||
SCRIPTS="
|
||||
${srcdest}bin/basename
|
||||
${srcdest}bin/cat
|
||||
${srcdest}bin/chmod
|
||||
${srcdest}bin/compress
|
||||
${srcdest}bin/cp
|
||||
${srcdest}bin/dirname
|
||||
${srcdest}bin/find
|
||||
${srcdest}bin/gash
|
||||
${srcdest}bin/grep
|
||||
${srcdest}bin/ls
|
||||
${srcdest}bin/mkdir
|
||||
${srcdest}bin/mv
|
||||
${srcdest}bin/reboot
|
||||
${srcdest}bin/rm
|
||||
${srcdest}bin/rmdir
|
||||
${srcdest}bin/sed
|
||||
${srcdest}bin/tar
|
||||
${srcdest}bin/touch
|
||||
${srcdest}bin/tr
|
||||
${srcdest}bin/wc
|
||||
${srcdest}bin/which
|
||||
"
|
||||
|
||||
export host=$($GUILE -c "(display %host-type)")
|
||||
|
||||
abs=$srcdest
|
||||
if [ "$GUILE_EFFECTIVE_VERSION" = "2.0" ]; then
|
||||
srcdest=$abs_top_srcdir/
|
||||
fi
|
||||
|
||||
GUILE_AUTO_COMPILE=0
|
||||
WARNINGS="
|
||||
--warn=unsupported-warning
|
||||
--warn=unused-variable
|
||||
--warn=unused-toplevel
|
||||
--warn=unbound-variable
|
||||
--warn=macro-use-before-definition
|
||||
--warn=arity-mismatch
|
||||
--warn=duplicate-case-datum
|
||||
--warn=bad-case-datum
|
||||
--warn=format
|
||||
"
|
||||
|
||||
for i in $SCM_FILES $SCRIPTS; do
|
||||
b=$(basename $i)
|
||||
go=${i%%.scm}.go
|
||||
if [ $i -nt $go ]; then
|
||||
trace "GUILEC $b" $GUILD compile -L ${srcdir} $WARNINGS -o $go $i
|
||||
fi
|
||||
done
|
|
@ -0,0 +1,45 @@
|
|||
#! @BASH@
|
||||
|
||||
# Gash --- Guile As SHell
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of Gash.
|
||||
#
|
||||
# Gash is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# Gash is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Gash. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
srcdir="@srcdir@"
|
||||
abs_top_srcdir="@abs_top_srcdir@"
|
||||
abs_top_builddir="@abs_top_builddir@"
|
||||
prefix=${prefix-@prefix@}
|
||||
|
||||
MES_PREFIX=${MES_PREFIX-${srcdest}mes}
|
||||
export MES_PREFIX
|
||||
|
||||
GUILE_LOAD_COMPILED_PATH="$abs_top_builddir/bin:$abs_top_builddir${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
|
||||
GUILE_LOAD_PATH="$abs_top_srcdir${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
|
||||
if [ -n "$srcdest" ]; then
|
||||
GUILE_LOAD_PATH="${srcdest}module:${srcdest}mes:$GUILE_LOAD_PATH"
|
||||
fi
|
||||
export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
|
||||
|
||||
PATH="$abs_top_builddir/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
COMMANDS="$abs_top_builddir/gash/commands"
|
||||
export COMMANDS
|
||||
|
||||
LANG=
|
||||
LC_ALL=
|
||||
|
||||
exec "$@"
|
|
@ -0,0 +1,41 @@
|
|||
# Gash --- Guile As SHell
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of Gash.
|
||||
#
|
||||
# Gash is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# Gash is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Gash. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [ -z "$V" -o "$V0" = 0 ]; then
|
||||
trace () {
|
||||
echo " $1"
|
||||
shift
|
||||
eval "$@" $LOG
|
||||
}
|
||||
LOG=" >>build.log 2>&1"
|
||||
fi
|
||||
if [ "$V" = 1 ]; then
|
||||
trace () {
|
||||
shift
|
||||
echo "$@"
|
||||
eval "$@ $LOG"
|
||||
}
|
||||
LOG=" >>build.log 2>&1"
|
||||
fi
|
||||
if [ "$V" = 2 ]; then
|
||||
set -x
|
||||
trace () {
|
||||
shift
|
||||
eval "$@"
|
||||
}
|
||||
fi
|
|
@ -0,0 +1,202 @@
|
|||
if [ -n "$V" ]; then
|
||||
set -x
|
||||
fi
|
||||
DIFF=diff
|
||||
SHELL=${SHELL-bin/gash}
|
||||
|
||||
tests='
|
||||
00-exit
|
||||
00-exit-0
|
||||
00-exit-1
|
||||
00-exit-2
|
||||
00-exit-error
|
||||
00-exit-var
|
||||
|
||||
01-script-newline
|
||||
01-script-semi
|
||||
01-script-backslash
|
||||
01-script-backslash-space
|
||||
01-script-backslash-twice
|
||||
01-script-$0
|
||||
01-script-$#
|
||||
01-script-$@
|
||||
01-script-shift
|
||||
|
||||
03-echo
|
||||
03-echo-doublequotes
|
||||
03-echo-nesting
|
||||
03-echo-escaped-doublequotes
|
||||
03-echo-quoted-doublequotes
|
||||
03-echo-brace
|
||||
|
||||
04-echo-var
|
||||
04-echo-equal
|
||||
04-echo-word-at
|
||||
04-echo-word-at-word
|
||||
|
||||
05-assignment
|
||||
05-assignment-echo
|
||||
05-assignment-empty
|
||||
05-assignment-singlequote
|
||||
05-assignment-double-quote
|
||||
05-assignment-variable-word
|
||||
05-assignment-word-variable
|
||||
05-assignment-doublequoted-doublequotes
|
||||
|
||||
06-compound-word
|
||||
06-command-compound-word
|
||||
|
||||
07-variable-or
|
||||
07-variable-not-or
|
||||
07-variable-or-slash
|
||||
07-variable-or-variable
|
||||
07-variable-or-doublequote
|
||||
07-variable-or-empty
|
||||
|
||||
08-variable-and
|
||||
08-variable-not-and
|
||||
|
||||
10-if
|
||||
10-if-false
|
||||
10-if-word-variable
|
||||
10-if-multiple
|
||||
10-if-else
|
||||
10-else-multiple
|
||||
10-if-elif
|
||||
10-if-test
|
||||
10-if-test-false
|
||||
10-if-bracket
|
||||
10-if-bracket-false
|
||||
10-if-redirect
|
||||
|
||||
11-for
|
||||
11-for-split-sequence
|
||||
11-for-done-subshell
|
||||
|
||||
20-semi
|
||||
20-or
|
||||
20-and
|
||||
20-pipe-exit-0
|
||||
20-pipe-exit-1
|
||||
20-pipe-sed
|
||||
20-exec
|
||||
|
||||
30-substitution
|
||||
30-substitution-word
|
||||
30-substitution-backtick
|
||||
30-substitution-assignment
|
||||
30-for-substitution
|
||||
30-substitution-assignment
|
||||
30-substitution-assignment-at
|
||||
30-substitution-redirect
|
||||
|
||||
40-eval
|
||||
40-eval-echo-variable
|
||||
40-assignment-eval-echo
|
||||
|
||||
41-dot
|
||||
42-sh
|
||||
42-sh-export
|
||||
|
||||
50-iohere
|
||||
50-iohere-builtin
|
||||
50-redirect
|
||||
50-redirect-space
|
||||
50-redirect-in
|
||||
50-redirect-append
|
||||
50-redirect-pipe
|
||||
50-redirect-merge
|
||||
50-redirect-sed
|
||||
50-redirect-in-out
|
||||
|
||||
60-function
|
||||
60-function-at
|
||||
60-subst
|
||||
|
||||
70-hash
|
||||
70-hash-hash
|
||||
70-percent
|
||||
70-percent-percent
|
||||
70-percent-space
|
||||
70-slash
|
||||
70-slash-string
|
||||
70-slash-string-slash
|
||||
|
||||
100-cd
|
||||
100-cd-foo
|
||||
|
||||
100-test
|
||||
100-test-file
|
||||
100-bracket-file
|
||||
|
||||
100-basename-root
|
||||
100-dirname-root
|
||||
100-basename-autoconf
|
||||
100-dirname-autoconf
|
||||
|
||||
100-sed
|
||||
100-sed-once
|
||||
100-sed-global
|
||||
100-sed-case
|
||||
100-sed-group
|
||||
100-sed-group-extended
|
||||
100-sed-twice
|
||||
100-sed-undo
|
||||
100-sed-file
|
||||
100-sed-fooRbar
|
||||
100-sed-pattern-address
|
||||
100-sed-quit
|
||||
100-sed-autoconf-basename
|
||||
|
||||
100-tar
|
||||
100-tar-Z
|
||||
100-tar-Z-old
|
||||
100-tar-Z-pipe
|
||||
100-tar-ro
|
||||
|
||||
100-tr
|
||||
'
|
||||
|
||||
broken="
|
||||
"
|
||||
|
||||
if [ "$(basename $SHELL)" = bash ]; then
|
||||
broken="
|
||||
00-sed
|
||||
"
|
||||
fi
|
||||
|
||||
expect=$(echo $broken | wc -w)
|
||||
pass=0
|
||||
fail=0
|
||||
total=0
|
||||
for t in $tests; do
|
||||
if [ "$PARSE" ]; then
|
||||
bin/gash -p "test/$t.sh"
|
||||
else
|
||||
sh test.sh "test/$t" &> test/"$t".log
|
||||
fi
|
||||
r=$?
|
||||
total=$((total+1))
|
||||
if [ $r = 0 ]; then
|
||||
echo $t: [OK]
|
||||
pass=$((pass+1))
|
||||
else
|
||||
echo $t: [FAIL]
|
||||
fail=$((fail+1))
|
||||
fi
|
||||
done
|
||||
|
||||
[ $expect != 0 ] && echo "expect: $expect"
|
||||
[ $fail != 0 ] && echo "failed: $fail"
|
||||
[ $fail -lt $expect ] && echo "solved: $(($expect - $fail))"
|
||||
echo "passed: $pass"
|
||||
echo "total: $total"
|
||||
if [ $fail != 0 -a $fail -gt $expect ]; then
|
||||
echo FAILED: $fail/$total
|
||||
exit 1
|
||||
elif [ $fail != 0 ]; then
|
||||
echo PASS: $pass/$total
|
||||
else
|
||||
echo PASS: $total
|
||||
fi
|
|
@ -0,0 +1,129 @@
|
|||
#! /bin/sh
|
||||
|
||||
VERSION=0.1
|
||||
|
||||
# parse --prefix=PREFIX, mainly for GuixSD/Debian
|
||||
cmdline=$(echo "$@")
|
||||
PREFIX=${cmdline##*--prefix=}
|
||||
PREFIX=${PREFIX% *}
|
||||
PREFIX=${PREFIX% -*}
|
||||
if [ -z "$PREFIX" ]; then
|
||||
PREFIX=/usr/local
|
||||
fi
|
||||
|
||||
BASH=$(command -v bash)
|
||||
GUILE=${GUILE-$(command -v guile)}
|
||||
GUILD=${GUILD-$(command -v guild || command -v guile-tools)}
|
||||
guile_site_dir=$PREFIX/share/guile/site/$guile_effective_version
|
||||
guile_site_ccache_dir=$PREFIX/lib/guile/$guile_effective_version/site-ccache
|
||||
guile_effective_version=$(guile -c '(display (effective-version))')
|
||||
MAKEINFO=$(command -v makeinfo)
|
||||
GEESH_PREFIX=${GEESH_PREFIX-$HOME/src/geesh}
|
||||
if [ -d $GEESH_PREFIX ]; then
|
||||
GUILE_LOAD_PATH=$GEESH_PREFIX:$GUILE_LOAD_PATH
|
||||
GUILE_LOAD_COMPILED_PATH=$GEESH_PREFIX:$GUILE_LOAD_COMPILED_PATH
|
||||
if ! $GUILE -c '(use-modules (geesh parser)) (exit (defined? '"'"'read-sh-all))'; then
|
||||
echo "warning: building without Geesh"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$srcdir" = . ]; then
|
||||
top_builddir=.
|
||||
else
|
||||
srcdest=${srcdest}
|
||||
top_builddir=$PWD
|
||||
fi
|
||||
abs_top_srcdir=${abs_top_srcdir-$(cd ${srcdir} && pwd)}
|
||||
abs_top_builddir=$PWD
|
||||
|
||||
cat > .config.make <<EOF
|
||||
BASH=$BASH
|
||||
GUILE=$GUILE
|
||||
GUILD=$GUILD
|
||||
prefix=$PREFIX
|
||||
bindir=$PREFIX/bin
|
||||
docdir=$PREFIX/share/doc/gash
|
||||
guile_effective_version=$guile_effective_version
|
||||
guile_site_dir=$guile_site_dir
|
||||
guile_site_ccache_dir=$guile_site_ccache_dir
|
||||
MAKEINFO=$MAKEINFO
|
||||
SHELL=$BASH
|
||||
VERSION=$VERSION
|
||||
EOF
|
||||
|
||||
BZIP2=$(command -v bzip2)
|
||||
COMPRESS=$(command -v compress)
|
||||
[ -z "$COMPRESS" ] && COMPRESS=$PWD/bin/compress
|
||||
GZIP=$(command -v gzip)
|
||||
XZ=$(command -v xz)
|
||||
|
||||
subst () {
|
||||
sed \
|
||||
-e s,"@srcdest@,$srcdest,"\
|
||||
-e s,"@srcdir@,$srcdir,"\
|
||||
-e s,"@abs_top_srcdir@,$abs_top_srcdir,"\
|
||||
-e s,"@abs_top_builddir@,$abs_top_builddir,"\
|
||||
-e s,"@top_builddir@,$top_builddir,"\
|
||||
-e s",@BASH@,$BASH,"\
|
||||
-e s",@GUILE@,$GUILE,"\
|
||||
-e s,"@prefix@,$prefix,"\
|
||||
-e s",@guile_site_dir@,$guile_site_dir,"\
|
||||
-e s",@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
|
||||
-e s",@BZIP2@,$BZIP2,"\
|
||||
-e s",@COMPRESS@,$COMPRESS,"\
|
||||
-e s",@GZIP@,$GZIP,"\
|
||||
-e s",@XZ@,$XZ,"\
|
||||
-e s",@VERSION@,$VERSION,"\
|
||||
-e s",@guile_site_dir@,$guile_site_dir,"\
|
||||
-e s",@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
|
||||
-e s",@builtin@,$builtin,"\
|
||||
$1 > $2
|
||||
}
|
||||
|
||||
SHELLS="
|
||||
bash
|
||||
gash
|
||||
sh
|
||||
"
|
||||
|
||||
for shell in $SHELLS; do
|
||||
subst ${srcdest}bin/gash.in bin/$shell
|
||||
chmod +x bin/$shell
|
||||
done
|
||||
|
||||
BUILTINS="
|
||||
basename
|
||||
cat
|
||||
chmod
|
||||
compress
|
||||
cp
|
||||
dirname
|
||||
find
|
||||
grep
|
||||
ls
|
||||
mkdir
|
||||
mv
|
||||
reboot
|
||||
rm
|
||||
rmdir
|
||||
sed
|
||||
tar
|
||||
touch
|
||||
tr
|
||||
wc
|
||||
which
|
||||
"
|
||||
for builtin in $BUILTINS; do
|
||||
subst ${srcdest}bin/builtin.in bin/$builtin
|
||||
chmod +x bin/$builtin
|
||||
done
|
||||
|
||||
subst ${srcdest}gash/config.scm.in gash/config.scm
|
||||
subst ${srcdest}build-aux/pre-inst-env.in pre-inst-env
|
||||
chmod +x pre-inst-env
|
||||
|
||||
cat <<EOF
|
||||
Run:
|
||||
make to build gash
|
||||
make help for help on other targets
|
||||
EOF
|
|
@ -0,0 +1,505 @@
|
|||
@c The GNU Free Documentation License.
|
||||
@center Version 1.3, 3 November 2008
|
||||
|
||||
@c This file is intended to be included within another document,
|
||||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
@uref{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@enumerate 0
|
||||
@item
|
||||
PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document @dfn{free} in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a way
|
||||
to get credit for their work, while not being considered responsible
|
||||
for modifications made by others.
|
||||
|
||||
This License is a kind of ``copyleft'', which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
@item
|
||||
APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The ``Document'', below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as ``you''. You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
A ``Modified Version'' of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A ``Secondary Section'' is a named appendix or a front-matter section
|
||||
of the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall
|
||||
subject (or to related matters) and contains nothing that could fall
|
||||
directly within that overall subject. (Thus, if the Document is in
|
||||
part a textbook of mathematics, a Secondary Section may not explain
|
||||
any mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
The ``Cover Texts'' are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
A ``Transparent'' copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not ``Transparent'' is called ``Opaque''.
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, La@TeX{} input
|
||||
format, SGML or XML using a publicly available
|
||||
DTD, and standard-conforming simple HTML,
|
||||
PostScript or PDF designed for human modification. Examples
|
||||
of transparent image formats include PNG, XCF and
|
||||
JPG. Opaque formats include proprietary formats that can be
|
||||
read and edited only by proprietary word processors, SGML or
|
||||
XML for which the DTD and/or processing tools are
|
||||
not generally available, and the machine-generated HTML,
|
||||
PostScript or PDF produced by some word processors for
|
||||
output purposes only.
|
||||
|
||||
The ``Title Page'' means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, ``Title Page'' means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
The ``publisher'' means any person or entity that distributes copies
|
||||
of the Document to the public.
|
||||
|
||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as ``Acknowledgements'',
|
||||
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section ``Entitled XYZ'' according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
|
||||
@item
|
||||
VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
|
||||
@item
|
||||
COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute an
|
||||
Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
|
||||
@item
|
||||
MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
@enumerate A
|
||||
@item
|
||||
Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.
|
||||
|
||||
@item
|
||||
List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has fewer than five),
|
||||
unless they release you from this requirement.
|
||||
|
||||
@item
|
||||
State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
|
||||
@item
|
||||
Preserve all the copyright notices of the Document.
|
||||
|
||||
@item
|
||||
Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
|
||||
@item
|
||||
Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.
|
||||
|
||||
@item
|
||||
Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
|
||||
@item
|
||||
Include an unaltered copy of this License.
|
||||
|
||||
@item
|
||||
Preserve the section Entitled ``History'', Preserve its Title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section Entitled ``History'' in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.
|
||||
|
||||
@item
|
||||
Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the ``History'' section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.
|
||||
|
||||
@item
|
||||
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
|
||||
the Title of the section, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements and/or
|
||||
dedications given therein.
|
||||
|
||||
@item
|
||||
Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.
|
||||
|
||||
@item
|
||||
Delete any section Entitled ``Endorsements''. Such a section
|
||||
may not be included in the Modified Version.
|
||||
|
||||
@item
|
||||
Do not retitle any existing section to be Entitled ``Endorsements'' or
|
||||
to conflict in title with any Invariant Section.
|
||||
|
||||
@item
|
||||
Preserve any Warranty Disclaimers.
|
||||
@end enumerate
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section Entitled ``Endorsements'', provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties---for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
|
||||
@item
|
||||
COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled ``History''
|
||||
in the various original documents, forming one section Entitled
|
||||
``History''; likewise combine any sections Entitled ``Acknowledgements'',
|
||||
and any sections Entitled ``Dedications''. You must delete all
|
||||
sections Entitled ``Endorsements.''
|
||||
|
||||
@item
|
||||
COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
|
||||
@item
|
||||
AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, is called an ``aggregate'' if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
|
||||
@item
|
||||
TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
If a section in the Document is Entitled ``Acknowledgements'',
|
||||
``Dedications'', or ``History'', the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
|
||||
@item
|
||||
TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||
will automatically terminate your rights under this License.
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, receipt of a copy of some or all of the same material does
|
||||
not give you any rights to use it.
|
||||
|
||||
@item
|
||||
FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
@uref{http://www.gnu.org/copyleft/}.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation. If the Document
|
||||
specifies that a proxy can decide which future versions of this
|
||||
License can be used, that proxy's public statement of acceptance of a
|
||||
version permanently authorizes you to choose that version for the
|
||||
Document.
|
||||
|
||||
@item
|
||||
RELICENSING
|
||||
|
||||
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
||||
World Wide Web server that publishes copyrightable works and also
|
||||
provides prominent facilities for anybody to edit those works. A
|
||||
public wiki that anybody can edit is an example of such a server. A
|
||||
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
||||
site means any set of copyrightable works thus published on the MMC
|
||||
site.
|
||||
|
||||
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
||||
license published by Creative Commons Corporation, a not-for-profit
|
||||
corporation with a principal place of business in San Francisco,
|
||||
California, as well as future copyleft versions of that license
|
||||
published by that same organization.
|
||||
|
||||
``Incorporate'' means to publish or republish a Document, in whole or
|
||||
in part, as part of another Document.
|
||||
|
||||
An MMC is ``eligible for relicensing'' if it is licensed under this
|
||||
License, and if all works that were first published under this License
|
||||
somewhere other than this MMC, and subsequently incorporated in whole
|
||||
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||
and (2) were thus incorporated prior to November 1, 2008.
|
||||
|
||||
The operator of an MMC Site may republish an MMC contained in the site
|
||||
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||
provided the MMC is eligible for relicensing.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@page
|
||||
@heading ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
Copyright (C) @var{year} @var{your name}.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
Texts. A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License''.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the ``with@dots{}Texts.''@: line with this:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
with the Invariant Sections being @var{list their titles}, with
|
||||
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
|
||||
being @var{list}.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
|
||||
@c Local Variables:
|
||||
@c ispell-local-pdict: "ispell-dict"
|
||||
@c End:
|
|
@ -0,0 +1,588 @@
|
|||
This is gash.info, produced by makeinfo version 6.5 from gash.texi.
|
||||
|
||||
Copyright © 2018 Rutger EW van Beusekom
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
any later version published by the Free Software Foundation; with no
|
||||
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
|
||||
copy of the license is included in the section entitled “GNU Free
|
||||
Documentation License”.
|
||||
INFO-DIR-SECTION Basics
|
||||
START-INFO-DIR-ENTRY
|
||||
* Gash: (gash). Guile As SHell.
|
||||
* gash: (gash)Invoking gash. Running Gash, a minimalist Bash lookalike.
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
|
||||
File: gash.info, Node: Top, Next: Introduction, Up: (dir)
|
||||
|
||||
Gash
|
||||
****
|
||||
|
||||
This document describes Gash version 0.1, a POSIX-compliant sh
|
||||
replacement in Guile Scheme.
|
||||
|
||||
* Menu:
|
||||
|
||||
* Introduction:: What is Gash about?
|
||||
* GNU Free Documentation License:: The license of this manual.
|
||||
* Concept Index:: Concepts.
|
||||
* Programming Index:: Data types, functions, and variables.
|
||||
|
||||
— The Detailed Node Listing —
|
||||
|
||||
Introduction
|
||||
|
||||
* Invoking Gash::
|
||||
|
||||
|
||||
|
||||
File: gash.info, Node: Introduction, Next: GNU Free Documentation License, Prev: Top, Up: Top
|
||||
|
||||
1 Introduction
|
||||
**************
|
||||
|
||||
* Menu:
|
||||
|
||||
* Invoking Gash::
|
||||
|
||||
|
||||
File: gash.info, Node: Invoking Gash, Up: Introduction
|
||||
|
||||
1.1 Invoking Gash
|
||||
=================
|
||||
|
||||
The ‘gash’ command is the sh interpreter.
|
||||
|
||||
gash OPTION... FILE
|
||||
|
||||
The OPTIONs can be among the following:
|
||||
|
||||
‘-c STRING’
|
||||
By default, Gash will read a file named on the command line as a
|
||||
script.
|
||||
|
||||
‘-h, --help’
|
||||
Display help on invoking Gash, and then exit.
|
||||
|
||||
‘-v, --version’
|
||||
Display the current version of Gash, and then exit.
|
||||
|
||||
|
||||
File: gash.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Introduction, Up: Top
|
||||
|
||||
Appendix A GNU Free Documentation License
|
||||
*****************************************
|
||||
|
||||
Version 1.3, 3 November 2008
|
||||
|
||||
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
<http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
0. PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document “free” in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or
|
||||
noncommercially. Secondarily, this License preserves for the
|
||||
author and publisher a way to get credit for their work, while not
|
||||
being considered responsible for modifications made by others.
|
||||
|
||||
This License is a kind of “copyleft”, which means that derivative
|
||||
works of the document must themselves be free in the same sense.
|
||||
It complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for
|
||||
free software, because free software needs free documentation: a
|
||||
free program should come with manuals providing the same freedoms
|
||||
that the software does. But this License is not limited to
|
||||
software manuals; it can be used for any textual work, regardless
|
||||
of subject matter or whether it is published as a printed book. We
|
||||
recommend this License principally for works whose purpose is
|
||||
instruction or reference.
|
||||
|
||||
1. APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium,
|
||||
that contains a notice placed by the copyright holder saying it can
|
||||
be distributed under the terms of this License. Such a notice
|
||||
grants a world-wide, royalty-free license, unlimited in duration,
|
||||
to use that work under the conditions stated herein. The
|
||||
“Document”, below, refers to any such manual or work. Any member
|
||||
of the public is a licensee, and is addressed as “you”. You accept
|
||||
the license if you copy, modify or distribute the work in a way
|
||||
requiring permission under copyright law.
|
||||
|
||||
A “Modified Version” of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A “Secondary Section” is a named appendix or a front-matter section
|
||||
of the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document’s overall
|
||||
subject (or to related matters) and contains nothing that could
|
||||
fall directly within that overall subject. (Thus, if the Document
|
||||
is in part a textbook of mathematics, a Secondary Section may not
|
||||
explain any mathematics.) The relationship could be a matter of
|
||||
historical connection with the subject or with related matters, or
|
||||
of legal, commercial, philosophical, ethical or political position
|
||||
regarding them.
|
||||
|
||||
The “Invariant Sections” are certain Secondary Sections whose
|
||||
titles are designated, as being those of Invariant Sections, in the
|
||||
notice that says that the Document is released under this License.
|
||||
If a section does not fit the above definition of Secondary then it
|
||||
is not allowed to be designated as Invariant. The Document may
|
||||
contain zero Invariant Sections. If the Document does not identify
|
||||
any Invariant Sections then there are none.
|
||||
|
||||
The “Cover Texts” are certain short passages of text that are
|
||||
listed, as Front-Cover Texts or Back-Cover Texts, in the notice
|
||||
that says that the Document is released under this License. A
|
||||
Front-Cover Text may be at most 5 words, and a Back-Cover Text may
|
||||
be at most 25 words.
|
||||
|
||||
A “Transparent” copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed
|
||||
of pixels) generic paint programs or (for drawings) some widely
|
||||
available drawing editor, and that is suitable for input to text
|
||||
formatters or for automatic translation to a variety of formats
|
||||
suitable for input to text formatters. A copy made in an otherwise
|
||||
Transparent file format whose markup, or absence of markup, has
|
||||
been arranged to thwart or discourage subsequent modification by
|
||||
readers is not Transparent. An image format is not Transparent if
|
||||
used for any substantial amount of text. A copy that is not
|
||||
“Transparent” is called “Opaque”.
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format,
|
||||
SGML or XML using a publicly available DTD, and standard-conforming
|
||||
simple HTML, PostScript or PDF designed for human modification.
|
||||
Examples of transparent image formats include PNG, XCF and JPG.
|
||||
Opaque formats include proprietary formats that can be read and
|
||||
edited only by proprietary word processors, SGML or XML for which
|
||||
the DTD and/or processing tools are not generally available, and
|
||||
the machine-generated HTML, PostScript or PDF produced by some word
|
||||
processors for output purposes only.
|
||||
|
||||
The “Title Page” means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the
|
||||
material this License requires to appear in the title page. For
|
||||
works in formats which do not have any title page as such, “Title
|
||||
Page” means the text near the most prominent appearance of the
|
||||
work’s title, preceding the beginning of the body of the text.
|
||||
|
||||
The “publisher” means any person or entity that distributes copies
|
||||
of the Document to the public.
|
||||
|
||||
A section “Entitled XYZ” means a named subunit of the Document
|
||||
whose title either is precisely XYZ or contains XYZ in parentheses
|
||||
following text that translates XYZ in another language. (Here XYZ
|
||||
stands for a specific section name mentioned below, such as
|
||||
“Acknowledgements”, “Dedications”, “Endorsements”, or “History”.)
|
||||
To “Preserve the Title” of such a section when you modify the
|
||||
Document means that it remains a section “Entitled XYZ” according
|
||||
to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice
|
||||
which states that this License applies to the Document. These
|
||||
Warranty Disclaimers are considered to be included by reference in
|
||||
this License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and
|
||||
has no effect on the meaning of this License.
|
||||
|
||||
2. VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License
|
||||
applies to the Document are reproduced in all copies, and that you
|
||||
add no other conditions whatsoever to those of this License. You
|
||||
may not use technical measures to obstruct or control the reading
|
||||
or further copying of the copies you make or distribute. However,
|
||||
you may accept compensation in exchange for copies. If you
|
||||
distribute a large enough number of copies you must also follow the
|
||||
conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above,
|
||||
and you may publicly display copies.
|
||||
|
||||
3. COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly
|
||||
have printed covers) of the Document, numbering more than 100, and
|
||||
the Document’s license notice requires Cover Texts, you must
|
||||
enclose the copies in covers that carry, clearly and legibly, all
|
||||
these Cover Texts: Front-Cover Texts on the front cover, and
|
||||
Back-Cover Texts on the back cover. Both covers must also clearly
|
||||
and legibly identify you as the publisher of these copies. The
|
||||
front cover must present the full title with all words of the title
|
||||
equally prominent and visible. You may add other material on the
|
||||
covers in addition. Copying with changes limited to the covers, as
|
||||
long as they preserve the title of the Document and satisfy these
|
||||
conditions, can be treated as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto
|
||||
adjacent pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document
|
||||
numbering more than 100, you must either include a machine-readable
|
||||
Transparent copy along with each Opaque copy, or state in or with
|
||||
each Opaque copy a computer-network location from which the general
|
||||
network-using public has access to download using public-standard
|
||||
network protocols a complete Transparent copy of the Document, free
|
||||
of added material. If you use the latter option, you must take
|
||||
reasonably prudent steps, when you begin distribution of Opaque
|
||||
copies in quantity, to ensure that this Transparent copy will
|
||||
remain thus accessible at the stated location until at least one
|
||||
year after the last time you distribute an Opaque copy (directly or
|
||||
through your agents or retailers) of that edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of
|
||||
the Document well before redistributing any large number of copies,
|
||||
to give them a chance to provide you with an updated version of the
|
||||
Document.
|
||||
|
||||
4. MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document
|
||||
under the conditions of sections 2 and 3 above, provided that you
|
||||
release the Modified Version under precisely this License, with the
|
||||
Modified Version filling the role of the Document, thus licensing
|
||||
distribution and modification of the Modified Version to whoever
|
||||
possesses a copy of it. In addition, you must do these things in
|
||||
the Modified Version:
|
||||
|
||||
A. Use in the Title Page (and on the covers, if any) a title
|
||||
distinct from that of the Document, and from those of previous
|
||||
versions (which should, if there were any, be listed in the
|
||||
History section of the Document). You may use the same title
|
||||
as a previous version if the original publisher of that
|
||||
version gives permission.
|
||||
|
||||
B. List on the Title Page, as authors, one or more persons or
|
||||
entities responsible for authorship of the modifications in
|
||||
the Modified Version, together with at least five of the
|
||||
principal authors of the Document (all of its principal
|
||||
authors, if it has fewer than five), unless they release you
|
||||
from this requirement.
|
||||
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
|
||||
D. Preserve all the copyright notices of the Document.
|
||||
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
|
||||
F. Include, immediately after the copyright notices, a license
|
||||
notice giving the public permission to use the Modified
|
||||
Version under the terms of this License, in the form shown in
|
||||
the Addendum below.
|
||||
|
||||
G. Preserve in that license notice the full lists of Invariant
|
||||
Sections and required Cover Texts given in the Document’s
|
||||
license notice.
|
||||
|
||||
H. Include an unaltered copy of this License.
|
||||
|
||||
I. Preserve the section Entitled “History”, Preserve its Title,
|
||||
and add to it an item stating at least the title, year, new
|
||||
authors, and publisher of the Modified Version as given on the
|
||||
Title Page. If there is no section Entitled “History” in the
|
||||
Document, create one stating the title, year, authors, and
|
||||
publisher of the Document as given on its Title Page, then add
|
||||
an item describing the Modified Version as stated in the
|
||||
previous sentence.
|
||||
|
||||
J. Preserve the network location, if any, given in the Document
|
||||
for public access to a Transparent copy of the Document, and
|
||||
likewise the network locations given in the Document for
|
||||
previous versions it was based on. These may be placed in the
|
||||
“History” section. You may omit a network location for a work
|
||||
that was published at least four years before the Document
|
||||
itself, or if the original publisher of the version it refers
|
||||
to gives permission.
|
||||
|
||||
K. For any section Entitled “Acknowledgements” or “Dedications”,
|
||||
Preserve the Title of the section, and preserve in the section
|
||||
all the substance and tone of each of the contributor
|
||||
acknowledgements and/or dedications given therein.
|
||||
|
||||
L. Preserve all the Invariant Sections of the Document, unaltered
|
||||
in their text and in their titles. Section numbers or the
|
||||
equivalent are not considered part of the section titles.
|
||||
|
||||
M. Delete any section Entitled “Endorsements”. Such a section
|
||||
may not be included in the Modified Version.
|
||||
|
||||
N. Do not retitle any existing section to be Entitled
|
||||
“Endorsements” or to conflict in title with any Invariant
|
||||
Section.
|
||||
|
||||
O. Preserve any Warranty Disclaimers.
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no
|
||||
material copied from the Document, you may at your option designate
|
||||
some or all of these sections as invariant. To do this, add their
|
||||
titles to the list of Invariant Sections in the Modified Version’s
|
||||
license notice. These titles must be distinct from any other
|
||||
section titles.
|
||||
|
||||
You may add a section Entitled “Endorsements”, provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties—for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of
|
||||
a standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text,
|
||||
and a passage of up to 25 words as a Back-Cover Text, to the end of
|
||||
the list of Cover Texts in the Modified Version. Only one passage
|
||||
of Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document
|
||||
already includes a cover text for the same cover, previously added
|
||||
by you or by arrangement made by the same entity you are acting on
|
||||
behalf of, you may not add another; but you may replace the old
|
||||
one, on explicit permission from the previous publisher that added
|
||||
the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this
|
||||
License give permission to use their names for publicity for or to
|
||||
assert or imply endorsement of any Modified Version.
|
||||
|
||||
5. COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under
|
||||
this License, under the terms defined in section 4 above for
|
||||
modified versions, provided that you include in the combination all
|
||||
of the Invariant Sections of all of the original documents,
|
||||
unmodified, and list them all as Invariant Sections of your
|
||||
combined work in its license notice, and that you preserve all
|
||||
their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name
|
||||
but different contents, make the title of each such section unique
|
||||
by adding at the end of it, in parentheses, the name of the
|
||||
original author or publisher of that section if known, or else a
|
||||
unique number. Make the same adjustment to the section titles in
|
||||
the list of Invariant Sections in the license notice of the
|
||||
combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled
|
||||
“History” in the various original documents, forming one section
|
||||
Entitled “History”; likewise combine any sections Entitled
|
||||
“Acknowledgements”, and any sections Entitled “Dedications”. You
|
||||
must delete all sections Entitled “Endorsements.”
|
||||
|
||||
6. COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other
|
||||
documents released under this License, and replace the individual
|
||||
copies of this License in the various documents with a single copy
|
||||
that is included in the collection, provided that you follow the
|
||||
rules of this License for verbatim copying of each of the documents
|
||||
in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and
|
||||
distribute it individually under this License, provided you insert
|
||||
a copy of this License into the extracted document, and follow this
|
||||
License in all other respects regarding verbatim copying of that
|
||||
document.
|
||||
|
||||
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other
|
||||
separate and independent documents or works, in or on a volume of a
|
||||
storage or distribution medium, is called an “aggregate” if the
|
||||
copyright resulting from the compilation is not used to limit the
|
||||
legal rights of the compilation’s users beyond what the individual
|
||||
works permit. When the Document is included in an aggregate, this
|
||||
License does not apply to the other works in the aggregate which
|
||||
are not themselves derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half
|
||||
of the entire aggregate, the Document’s Cover Texts may be placed
|
||||
on covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic
|
||||
form. Otherwise they must appear on printed covers that bracket
|
||||
the whole aggregate.
|
||||
|
||||
8. TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section
|
||||
4. Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also
|
||||
include the original English version of this License and the
|
||||
original versions of those notices and disclaimers. In case of a
|
||||
disagreement between the translation and the original version of
|
||||
this License or a notice or disclaimer, the original version will
|
||||
prevail.
|
||||
|
||||
If a section in the Document is Entitled “Acknowledgements”,
|
||||
“Dedications”, or “History”, the requirement (section 4) to
|
||||
Preserve its Title (section 1) will typically require changing the
|
||||
actual title.
|
||||
|
||||
9. TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, or distribute it is void,
|
||||
and will automatically terminate your rights under this License.
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the
|
||||
copyright holder fails to notify you of the violation by some
|
||||
reasonable means prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from
|
||||
that copyright holder, and you cure the violation prior to 30 days
|
||||
after your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate
|
||||
the licenses of parties who have received copies or rights from you
|
||||
under this License. If your rights have been terminated and not
|
||||
permanently reinstated, receipt of a copy of some or all of the
|
||||
same material does not give you any rights to use it.
|
||||
|
||||
10. FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions of
|
||||
the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
<http://www.gnu.org/copyleft/>.
|
||||
|
||||
Each version of the License is given a distinguishing version
|
||||
number. If the Document specifies that a particular numbered
|
||||
version of this License “or any later version” applies to it, you
|
||||
have the option of following the terms and conditions either of
|
||||
that specified version or of any later version that has been
|
||||
published (not as a draft) by the Free Software Foundation. If the
|
||||
Document does not specify a version number of this License, you may
|
||||
choose any version ever published (not as a draft) by the Free
|
||||
Software Foundation. If the Document specifies that a proxy can
|
||||
decide which future versions of this License can be used, that
|
||||
proxy’s public statement of acceptance of a version permanently
|
||||
authorizes you to choose that version for the Document.
|
||||
|
||||
11. RELICENSING
|
||||
|
||||
“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
|
||||
World Wide Web server that publishes copyrightable works and also
|
||||
provides prominent facilities for anybody to edit those works. A
|
||||
public wiki that anybody can edit is an example of such a server.
|
||||
A “Massive Multiauthor Collaboration” (or “MMC”) contained in the
|
||||
site means any set of copyrightable works thus published on the MMC
|
||||
site.
|
||||
|
||||
“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
|
||||
license published by Creative Commons Corporation, a not-for-profit
|
||||
corporation with a principal place of business in San Francisco,
|
||||
California, as well as future copyleft versions of that license
|
||||
published by that same organization.
|
||||
|
||||
“Incorporate” means to publish or republish a Document, in whole or
|
||||
in part, as part of another Document.
|
||||
|
||||
An MMC is “eligible for relicensing” if it is licensed under this
|
||||
License, and if all works that were first published under this
|
||||
License somewhere other than this MMC, and subsequently
|
||||
incorporated in whole or in part into the MMC, (1) had no cover
|
||||
texts or invariant sections, and (2) were thus incorporated prior
|
||||
to November 1, 2008.
|
||||
|
||||
The operator of an MMC Site may republish an MMC contained in the
|
||||
site under CC-BY-SA on the same site at any time before August 1,
|
||||
2009, provided the MMC is eligible for relicensing.
|
||||
|
||||
ADDENDUM: How to use this License for your documents
|
||||
====================================================
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and license
|
||||
notices just after the title page:
|
||||
|
||||
Copyright (C) YEAR YOUR NAME.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
Texts. A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License''.
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover
|
||||
Texts, replace the “with...Texts.” line with this:
|
||||
|
||||
with the Invariant Sections being LIST THEIR TITLES, with
|
||||
the Front-Cover Texts being LIST, and with the Back-Cover Texts
|
||||
being LIST.
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of free
|
||||
software license, such as the GNU General Public License, to permit
|
||||
their use in free software.
|
||||
|
||||
|
||||
File: gash.info, Node: Concept Index, Next: Programming Index, Prev: GNU Free Documentation License, Up: Top
|
||||
|
||||
Concept Index
|
||||
*************
|
||||
|
||||
|