Commit Graph

38 Commits

Author SHA1 Message Date
Timothy Sample a4cfff0641 Generate the ChangeLog reproducibly.
* build-aux/gitlog-to-changelog-repro.patch: New file.
* Makefile.am (EXTRA_DIST): Add it.
(build-aux/gitlog-to-changelog-repro): New rule.
(gen-ChangeLog): Use 'gitlog-to-changelog-repro'.
(DISTCLEANFILES): Add 'build-aux/gitlog-to-changelog-repro'.
2019-12-09 13:57:15 -05:00
Timothy Sample 7d2298d15b Aggregate tests into test suites.
This is a big change, but it is conceptually quite simple.  In the old
system, the tests were specified each by multiple files ('.sh', '.exit',
'.stdout', and '.stderr'), and run with the 'test.sh' script.  In the
new system there are multiple tests per file ('.org') and these test
suite files are run with the 'tests/run-test-suite' script.

* tests/00-exit-0.sh,
tests/00-exit-1.exit,
tests/00-exit-1.sh,
tests/00-exit-2.exit,
tests/00-exit-2.sh,
tests/00-exit-error.exit,
tests/00-exit-error.sh,
tests/00-exit-var.exit,
tests/00-exit-var.sh,
tests/00-exit.sh: Delete files, moving their contents...
* tests/exiting.org: ...here.
* tests/01-script-arg-0.sh,
tests/01-script-arg-length.sh,
tests/01-script-arg-length.stdout,
tests/01-script-arg-list.sh,
tests/01-script-arg-list.stdout,
tests/01-script-backslash-space.sh,
tests/01-script-backslash-twice.exit,
tests/01-script-backslash-twice.sh,
tests/01-script-backslash.exit,
tests/01-script-backslash.sh,
tests/01-script-newline.exit,
tests/01-script-newline.sh,
tests/01-script-semi.exit,
tests/01-script-semi.sh,
tests/01-script-shift.sh,
tests/01-script-shift.stdout: Delete files, moving their contents...
* tests/arguments.org: ...here.
* tests/03-echo-brace.sh,
tests/03-echo-brace.stdout,
tests/03-echo-doublequotes.sh,
tests/03-echo-doublequotes.stdout,
tests/03-echo-escaped-doublequotes.sh,
tests/03-echo-escaped-doublequotes.stdout,
tests/03-echo-nesting.sh,
tests/03-echo-nesting.stdout,
tests/03-echo-quoted-doublequotes.sh,
tests/03-echo-quoted-doublequotes.stdout,
tests/03-echo.sh: Delete files, moving their contents...
* tests/words.org: ...here.
* tests/04-echo-equal.sh,
tests/04-echo-equal.stdout,
tests/04-echo-var.sh,
tests/04-echo-word-at-word.sh,
tests/04-echo-word-at-word.stdout,
tests/04-echo-word-at.sh,
tests/04-echo-word-at.stdout: Delete files, moving their contents...
* tests/variable-words.org: ...here.
* tests/05-assignment-backtick.sh,
tests/05-assignment-backtick.stdout,
tests/05-assignment-double-quote.sh,
tests/05-assignment-doublequoted-doublequotes.sh,
tests/05-assignment-doublequoted-doublequotes.stdout,
tests/05-assignment-echo.sh,
tests/05-assignment-echo.stdout,
tests/05-assignment-empty.sh,
tests/05-assignment-empty.stdout,
tests/05-assignment-singlequote.sh,
tests/05-assignment-variable-word.sh,
tests/05-assignment-variable-word.stdout,
tests/05-assignment-word-variable.sh,
tests/05-assignment-word-variable.stdout,
tests/05-assignment.sh: Delete files, moving their contents...
* tests/assignments.org: ...here.
* tests/06-command-compound-word.sh,
tests/06-command-compound-word.stdout,
tests/06-compound-word.sh,
tests/06-compound-word.stdout: Delete files, moving their contents...
* tests/compound-words.org: ...here.
* tests/07-variable-not-or.sh,
tests/07-variable-not-or.stdout,
tests/07-variable-or-doublequote.sh,
tests/07-variable-or-doublequote.stdout,
tests/07-variable-or-empty.sh,
tests/07-variable-or-empty.stdout,
tests/07-variable-or-slash.sh,
tests/07-variable-or-variable.sh,
tests/07-variable-or-variable.stdout,
tests/07-variable-or.sh,
tests/07-variable-or.stdout: Delete files, moving their contents...
* tests/variable-or.org: ...here.
* tests/08-variable-and.sh,
tests/08-variable-and.stdout,
tests/08-variable-not-and.sh,
tests/08-variable-not-and.stdout: Delete files, moving their contents...
* tests/variable-and.org: ...here.
* tests/10-else-multiple.sh,
tests/10-else.multiple.stdout,
tests/10-if-bracket-false.sh,
tests/10-if-bracket.sh,
tests/10-if-elif.sh,
tests/10-if-else.sh,
tests/10-if-false.sh,
tests/10-if-line.sh,
tests/10-if-multiple.sh,
tests/10-if-multiple.stdout,
tests/10-if-redirect.sh,
tests/10-if-test-false.sh,
tests/10-if-test.sh,
tests/10-if-word-variable.sh,
tests/10-if.sh: Delete files, moving their contents...
* tests/conditionals.org: ...here.
* tests/11-for-done-subshell.sh,
tests/11-for-done-subshell.stdout,
tests/11-for-split-sequence.sh,
tests/11-for-split-sequence.stdout,
tests/11-for.sh,
tests/11-for.stdout: Delete files, moving their contents...
* tests/loops.org: ...here.
* tests/20-and.exit,
tests/20-and.sh,
tests/20-exec.sh,
tests/20-or.sh,
tests/20-pipe-exit-0.sh,
tests/20-pipe-exit-1.exit,
tests/20-pipe-exit-1.sh,
tests/20-pipe-sed-cat.sh,
tests/20-pipe-sed-cat.stdout,
tests/20-pipe-sed.sh,
tests/20-pipe-sed.stdout,
tests/20-semi.exit,
tests/20-semi.sh: Delete files, moving their contents...
* tests/pipes-and-booleans.org: ...here.
* tests/30-for-substitution.sh,
tests/30-for-substitution.stdout,
tests/30-substitution-assignment-at.sh,
tests/30-substitution-assignment-at.stdout,
tests/30-substitution-assignment.sh,
tests/30-substitution-assignment.stdout,
tests/30-substitution-backtick.sh,
tests/30-substitution-backtick.stdout,
tests/30-substitution-redirect.sh,
tests/30-substitution-redirect.stdout,
tests/30-substitution-word.sh,
tests/30-substitution-word.stdout,
tests/30-substitution.sh,
tests/30-substitution.stdout: Delete files, moving their contents...
* tests/command-substitution.org: ...here.
* tests/40-assignment-eval-echo.sh,
tests/40-assignment-eval-echo.stdout,
tests/40-eval-echo-variable.sh,
tests/40-eval-echo-variable.stdout,
tests/40-eval.sh,
tests/40-eval.stdout: Delete files, moving their contents...
* tests/eval.org: ...here.
* tests/41-dot.sh,
tests/41-dot.stdout: Delete files, moving their contents...
* tests/dot.org: ...here.
* tests/42-export-new.sh,
tests/42-export-new.stdout,
tests/42-sh-export-new.sh,
tests/42-sh-export-new.stdout,
tests/42-sh-export.sh,
tests/42-sh-export.stdout,
tests/42-sh.sh,
tests/42-sh.stdout: Delete files, moving their contents...
* tests/exporting.org: ...here.
* tests/data/42-export-new.sh: New file (copied from
'tests/42-export-new.sh').
* tests/43-trap-subshell.sh,
tests/43-trap-subshell.stdout: Delete files, moving their contents...
* tests/signals.org: ...here.
* tests/50-iohere-builtin.sh,
tests/50-iohere.sh,
tests/50-iohere.stdout,
tests/50-redirect-append.sh,
tests/50-redirect-append.stdout,
tests/50-redirect-clobber.sh,
tests/50-redirect-clobber.stdout,
tests/50-redirect-in-out.sh,
tests/50-redirect-in-out.stdout,
tests/50-redirect-in.sh,
tests/50-redirect-merge.sh,
tests/50-redirect-merge.stdout,
tests/50-redirect-pipe.sh,
tests/50-redirect-pipe.stdout,
tests/50-redirect-sed.sh,
tests/50-redirect-sed.stdout,
tests/50-redirect-space.sh,
tests/50-redirect-space.stdout,
tests/50-redirect.sh,
tests/50-redirect.stdout: Delete files, moving their contents...
* tests/redirects.org: ...here.
* tests/60-function-at.sh,
tests/60-function-at.stdout,
tests/60-function.sh,
tests/60-function.stdout,
tests/60-subst.sh: Delete files, moving their contents...
* tests/functions.org: ...here.
* tests/70-hash-hash.sh,
tests/70-hash-hash.stdout,
tests/70-hash.sh,
tests/70-hash.stdout,
tests/70-percent-percent.sh,
tests/70-percent-percent.stdout,
tests/70-percent-space.sh,
tests/70-percent-space.stdout,
tests/70-percent.sh,
tests/70-percent.stdout,
tests/70-slash-string-slash.sh,
tests/70-slash-string.sh,
tests/70-slash-string.stdout,
tests/70-slash.sh,
tests/70-slash.stdout: Delete files, moving their contents...
* tests/variable-patterns.org: ...here.
* tests/100-bracket-file.sh,
tests/100-cd-foo.exit,
tests/100-cd-foo.sh,
tests/100-cd.sh,
tests/100-cd.stdout,
tests/100-test-false.sh,
tests/100-test-file.sh,
tests/100-test.sh: Delete files.
* tests/README: Move this...
* tests/data/README: ...here and adapt to the new directory.
* test.sh: Delete file.
* tests/run-test-suite.in: New file.
* configure.ac: Configure it.
* Makefile.am (TEST_EXTENSIONS): Replace '.sh' with '.org'.
(SH_LOG_COMPILER): Delete variable.
(ORG_LOG_COMPILER): New variable.
(FULL_TESTS, XFAIL_TESTS): Replace '.sh' tests with '.org' tests.
(BROKEN_TESTS): Delete variable.
(TEST_DATA_FILES): Remove '.exit' and '.stdout' files; add
tests/data/42-export-new.sh.
(EXTRA_DIST): Add tests/data/README; remove tests/README,
BROKEN_TESTS, and test.sh.
* .gitignore: Adjust accordingly.
2019-06-14 20:27:33 -04:00
Timothy Sample a4efd9359e Use Automake recipes from Guile.
* build-aux/guile-rules.am: Delete file.
* build-aux/guile.am: New file.
* .gitignore: Do not ignore it.
* Makefile.am: Adapt variable names to the new file.
2019-05-22 00:44:39 -04:00
Timothy Sample fcf32d1cad Setup documentation generation.
* Makefile.am (info_TEXINFOS, gash_TEXINFOS): New targets.
* guix.scm: Add 'texinfo' to build inputs.
* doc/gash.info: Delete file.
* .gitignore: Ignore generated documentation files.
2019-05-20 18:07:47 -04:00
Timothy Sample 315815bbd6 Factor out and update the usual Guile rules.
* build-aux/guile-rules.am: New file.
* .gitignore: Do not ignore it.
* Makefile.am: Include it, remove the rules it replaces, update
changed variable names, and use appending for 'EXTRA_DIST' and
'CLEANFILES'.
2019-05-20 01:18:54 -04:00
Timothy Sample 7c1c3ad5c8 Setup ChangeLog generation.
Use the 'gitlog-to-changelog' script from Gnulib to generate a
ChangeLog from the Git commit log when creating the distribution
tarball.

* build-aux/gitlog-to-changelog: New file.
* .gitignore: Do not ignore it.
* Makefile.am (gen-ChangeLog): New target.
(dist-hook): Depend on it.
* ChangeLog: New file.
2019-05-20 01:18:54 -04:00
Timothy Sample 5ffb3413de Move 'pre-inst-env.in' to 'build-aux'.
* pre-inst-env.in: Move this...
* build-aux/pre-inst-env.in: ...here.
* configure.ac: Update reference.
* .gitignore: Do not ignore it, and remove a duplicate 'pre-inst-env'.
2019-05-20 01:18:54 -04:00
Timothy Sample 7ddcf2a81e Clean up .gitignore.
* .gitignore: Remove old '/bin' entries; sort lines; and make things
absolute where that makes sense.
2019-05-20 01:18:54 -04:00
Jan Nieuwenhuizen cf5611f6d4 Replace geesh script with gash.
* geesh/repl.scm (run-repl): Add optional parse? parameter.
* gash/gash.scm (main): Rewrite to use Geesh parser and evaluator.
* scripts/geesh.in: Remove.
* Makefile.am: Remove scripts/geesh; adjust XFAIL_TESTS.
* .gitignore: Update.

Co-authored-by: Timothy Sample <samplet@ngyro.com>
2019-05-20 01:17:14 -04:00
Timothy Sample 117a33d18e Use Automake to run Gash tests.
* Makefile.am: Add Gash tests and use test.sh as the log compiler.
* test.sh: Use TEST_SHELL instead of SHELL to parameterize which shell
is being tested.
* tests/06-command-compound-word.sh: Adjust this test so that it works
even if the srcdir variable is set.
* .gitignore: Add tests/*.trs
2019-05-16 10:49:38 -04:00
Timothy Sample fe7a322d4e Move test/* to tests.
* test/*: Move these...
* tests: ...to this directory.
* check.sh, test.sh, .gitignore: Update references.
2019-05-16 10:49:38 -04:00
Timothy Sample 7e8caba055 Build Gash with Autotools.
This commit allows most of Gash to be built with Autotools.  It also
removes some of the Gash build scripts.

* configure.ac: Add checks for compress, gzip, bzip2, and xz;
configure gash/config.scm.
* Makefile.am: Add Gash modules and the 'gash' script.
* scripts/gash.in: Rename 'guile_site_dir' to 'MODDIR' and
'guile_site_ccache_dir' to 'GODIR'.
* configure: Delete file.
* makefile: Delete file.
* build-aux/build-guile.sh: Delete file.
* build-aux/pre-inst-env.in: Delete file.
* build-aux/trace.sh: Delete file.
* .gitignore: Add configure; remove exceptions for the deleted
build-aux files.
2019-05-16 10:49:16 -04:00
Timothy Sample c5e5a34fc0 Move bin/gash to scripts.
* bin/gash.in: Move this...
* scripts/gash.in: ...here.
* configure, build-aux/build-guile.sh, makefile,
  check.sh, test.sh, .gitignore: Update references.
2019-01-12 11:42:35 -05:00
Timothy Sample 23e53f4e49 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).
2018-12-13 13:42:21 -05:00
Timothy Sample 110167674e Reorganize tests
* tests/bash-without-bash.scm: Move this...
* tests/bootstrap/bash-without-bash.scm: ...here.
* tests/*.scm*: Move these...
* tests/unit: ...into this directory.
* configure.ac: Update paths.
* Makefile.am: Ditto.
* .gitignore: Ditto.
2018-12-12 14:23:09 -05:00
Timothy Sample acaaa3c322 Use git-version-gen for versioning
* build-aux/git-version-gen: New file.
* .gitignore: Do not ignore it.
* configure.ac: Use it to generate the version string.
* guix.scm: Ditto.
* Makefile.am: Make .tarball-version.
2018-12-05 22:17:41 -05:00
Timothy Sample f84b6235db Add Oil shell specification tests
tests/spec/oil.scm: New file.
tests/spec/check-spec: New file.
tests/spec/Makefile.am: New file.
configure.ac: Add the new Makefile.
Makefile.am (check-spec): New rule for running Oil shell
specification tests.
(clean-local): New rule that tells Automake how to clean up the
specification tests.
.gitignore: Add tests/spec/oil and tests/spec/oil-link.
2018-12-05 16:06:14 -05:00
Jan Nieuwenhuizen a043f9ef09 tr: New builtin.
* gash/commands/tr.scm: New file.
* gash/bournish-commands.scm: Use it.
* build-aux/build-guile.sh: Compile it.
* configure: Wrap it.
* .gitignore: Ignore it.
2018-12-02 09:03:02 +01:00
Jan Nieuwenhuizen 0a09ab114a mv: New builtin.
* gash/commands/mv.scm: New file.
* gash/bournish-commands.scm: Use it.
* build-aux/build-guile.sh: Compile it.
* configure: Wrap it.
* .gitignore: Ignore it.
2018-11-30 12:38:24 +01:00
Timothy Sample b9ec924bbe Add shell module
* geesh/shell.scm: New file.
* tests/shell.scm: New file.
* Makefile.am: Add them.
* tests/config.scm.in: New file.
* configure.ac: Add it.
* .gitignore: Add its generated form.
* .dir-locals.el: Add indentation rule for 'make-script'.
2018-11-28 23:07:03 -05:00
Timothy Sample 870c10b37a Add a CI script for GitLab
* build-aux/gitlab-ci.yml: New file.
* .gitignore: Do not ignore it.
2018-11-28 21:55:22 -05:00
Jan Nieuwenhuizen 1e51c5cbd1 basename: New builtin.
* gash/commands/basename.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (basename-command): New variable.
(%bournish-commands): Add it.
2018-11-05 20:46:25 +01:00
Jan Nieuwenhuizen f014281c29 dirname: New builtin.
* gash/commands/dirname.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (dirname-command): New variable.
(%bournish-commands): Add it.
2018-11-05 20:46:25 +01:00
Jan Nieuwenhuizen 45479fc651 rmdir: New builtin.
* gash/commands/rmdir.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (rmdir-command): New variable.
(%bournish-commands): Add it.
* gash/shell-utils.scm (rmdir-p): New function.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen f62e6e99a7 mkdir: New builtin.
* gash/commands/mkdir.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/bournish-commands.scm (mkdir-command): New variable.
(%bournish-commands): Add it.
2018-11-05 20:13:26 +01:00
Jan Nieuwenhuizen 992e12444d chmod: New builtin.
* gash/commands/chmod.scm: New file.
* build-aux/build-guile.sh: Compile it.
* .gitignore: Ignore it.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen aafbc96dbd rm: Resurrect.
* gash/commands/rm.scm: Resurrect.
* gash/bournish-commands.scm: Add it.
* build-aux/build-guile.sh: Compile it.
* .gitignore: Ignore it.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen f27cb9a192 sed: New builtin.
* gash/commands/sed.scm: New file.
* build-aux/build-guile.sh: Compile it.
* configure: Create script.
* gash/shell-utils.scm (with-atomic-file-replacement,
substitute*): New function, Import from Guix.
(substitute-port): New function.
2018-11-05 19:59:53 +01:00
Jan Nieuwenhuizen 9d1d2be6a6 test: Add expectations.
* check.sh: New file, from test.sh.
* test.sh: Run single test with expectations.
2018-11-03 08:02:49 +01:00
Jan Nieuwenhuizen b433052b4a builtins: Split out into gash/commands/.
* gash/commands/cat.scm: New file, expand from bournish-commands.scm.
* gash/commands/compress.scm: Likewise.
* gash/commands/cp.scm: Likewise.
* gash/commands/find.scm: Likewise.
* gash/commands/grep.scm: Likewise.
* gash/commands/ls.scm: Likewise.
* gash/commands/reboot.scm: Likewise.
* gash/commands/tar.scm: Likewise.
* gash/commands/wc.scm: Likewise.
* gash/commands/which.scm: Likewise.
* build-aux/pre-inst-env.in: New file.
* configure: Expand it.
* gash/bournish-commands.scm: Remove.
* gash/shell-utils.scm: Rename from guix-build-utils.scm.
2018-11-03 08:02:49 +01:00
Jan Nieuwenhuizen 975f53d98e bournish: Add compress, from Guile100 challenge by Daniel Hartwig. WIP 2018-10-29 14:51:00 +01:00
Jan Nieuwenhuizen 904eecbb2c Expose all bournish commands as external command.
* bin/builtin.in: New file.
* bin/tar.in: Remove.
* configure: Generate bin/<builtin> for all bournish-commands.
* build-aux/build-guile.sh: Compile them.
* .gitignore: Ignore them.
2018-10-27 11:31:22 +02:00
Jan Nieuwenhuizen b8b170530c bournish: Add tar, from Guile100 challenge by Mark Weaver.
See https://github.com/spk121/guile100

* bin/tar.in: New file.
* configure: Produce bin/tar.
* .gitignore: Ignore it.
* makefile (bin/tar): New target.
* gash/tar.scm: New file.
* gash/ustar.scm: New file.
* build-aux/build-guile.sh: Compile new files.
2018-10-27 11:30:45 +02:00
Jan Nieuwenhuizen 512b848b11 build: Add config.scm.in.
* gash/config.scm.in:
* configure: Use it to generate gash/config.scm
* .gitignore: Ignore generated file.
* gash/gash.scm (display-version): Use it.
* build-aux/build-guile.sh: Compile it.
2018-07-14 15:10:44 +02:00
Jan Nieuwenhuizen 859a95efe2 doc: Add skeleton. 2018-07-10 00:11:50 +02:00
Jan Nieuwenhuizen 7b9871478b build: add ./configure, compile .go files.
* configure: New file.
* build-aux/build-guile.sh: New file.
* makefile (all-go): New target.
2018-06-29 20:18:02 +02:00
Jan Nieuwenhuizen cd4a80d3cb build: add makefile, build bin/gash
* bin/gash.in: New file.
* bin/gash: Remove
* makefile: New file.
2018-06-29 20:18:02 +02:00
Timothy Sample cdded95d88 Initial commit 2018-01-31 14:52:05 -05:00