Skip to content

Commit

Permalink
Add 1-minute tutorial: Prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras committed Apr 13, 2024
1 parent fa52f8c commit afa83cf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bach/run
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Run an arbitrary application via the command-line: NAME [ARGS...]
.bach/src/run.bach/run/bach/internal/RunTool.java
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,37 @@
Bach is a Java Shell-like that orchestrates [JDK tools] for building modular Java projects.

## Prelude

Install Bach's basic tool framework using its sources via `git` and Java 22 or higher.

First time:
```shell
mkdir myproject
cd myproject
git init
git submodule add https://github.com/sormuras/run.bach .bach/src/run.bach/run/bach
echo .bach/src/run.bach/run/bach/internal/RunTool.java > .bach/run
```

Subsequent times:
```shell
cd myproject
git submodule update --remote --recursive
```

Run time:
```shell
java @.bach/run jar --version
java @.bach/run java --version
java @.bach/run https://raw.githubusercontent.com/sormuras/hello/main/Hello.java World
java @.bach/run https://github.com/sormuras/hello/releases/download/1-M3/hello-1-M3.jar World
```
Consult the following manual pages for details of `git` and `java` tools:
- [git init](https://git-scm.com/docs/git-init) - Create an empty Git repository or reinitialize an existing one
- [git submodule](https://git-scm.com/docs/git-submodule) - Initialize, update or inspect submodules
- [java @file](https://docs.oracle.com/en/java/javase/22/docs/specs/man/java.html#java-command-line-argument-files) - Java Command-Line Argument Files

# be free - have fun

[![jdk22](https://img.shields.io/badge/JDK-22-blue.svg)](https://jdk.java.net)
Expand Down

0 comments on commit afa83cf

Please sign in to comment.