Skip to content

Commit 8fe11d4

Browse files
Create tools/jules.md with setup instructions
This file provides instructions for the agent on how to install necessary dependencies like Ollama and Bats, and how to run the demo suite for this repository. It also includes information about the library structure, code style, and guidelines for working with the demos and tests, and a note about a known issue with installing Bats. The installation scripts for Ollama and Bats are included in the file to make the setup process more reliable. It also includes instructions for testing with different versions of Bash.
1 parent 26c7fac commit 8fe11d4

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

tools/jules.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,43 @@ This repository does not currently have a `tests` directory. If I need to add te
6262
3. Write the tests using the Bats testing framework. I should source the `ollama_bash_lib.sh` file in my test scripts to access its functions.
6363
4. To run the tests, I can use the `bats` command: `bats tests/`.
6464

65+
## Testing with Different Bash Versions
66+
67+
This library must be compatible with Bash v3.2. I should also test with newer versions like v4 and v5 to ensure continued compatibility.
68+
69+
### Installing Different Bash Versions
70+
71+
To install a specific version of Bash, I can compile it from source. Here are the general steps:
72+
73+
1. Create a temporary directory for the build (e.g., `~/bash_build`).
74+
2. Download the source code for the desired Bash version from the GNU FTP server: `http://ftp.gnu.org/gnu/bash/`. For example, for Bash 3.2.57:
75+
```bash
76+
wget http://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz
77+
```
78+
3. Extract the downloaded tarball:
79+
```bash
80+
tar -xzf bash-3.2.57.tar.gz
81+
```
82+
4. Navigate into the extracted directory:
83+
```bash
84+
cd bash-3.2.57
85+
```
86+
5. Configure and compile the source code:
87+
```bash
88+
./configure && make
89+
```
90+
6. The compiled `bash` binary will be available in the current directory.
91+
92+
### Running Tests with a Specific Bash Version
93+
94+
To run a script with a specific version of Bash, I can use the full path to the compiled binary:
95+
96+
```bash
97+
/path/to/bash-3.2.57/bash my_script_to_test.sh
98+
```
99+
100+
When running tests with Bats, I should ensure that the shebang of the test files points to the correct Bash executable, or I can invoke the tests with the specific bash version.
101+
65102
## Installation
66103

67104
### Installing Ollama

0 commit comments

Comments
 (0)