Skip to content

Commit a529521

Browse files
authored
fix: update documentation about init script and permissions (#26)
1 parent 3c5798e commit a529521

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ It supports initialising all environments or specific ones based on the provided
6262
### Usage
6363

6464
```sh
65-
./init.sh [--what/-w all|r|python|julia] [--force/-f] [--help/-h]
65+
./init-env.sh [--what/-w all|r|python|julia] [--force/-f] [--help/-h]
6666
```
6767

6868
### Script Details
6969

7070
- **Options**:
71-
- `--what/-w`: Specify which environment(s) to initialise (`all`, `r`, `python (uv)`, `julia`).
71+
- `--what/-w`: Specify which environment(s) to initialise (`all`, `r`, `python` (uv), `julia`).
7272
- `--force/-f`: Force reinstallation of the specified environment(s).
7373
- `--help/-h`: Display help message and exit.
7474
- **Functionality**: The script installs necessary dependencies for R, Python, and Julia, inside environments.

init-env.sh

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ show_help() {
1212
}
1313

1414
initialise_r() {
15-
if [ "$FORCE" = true ] || [ ! -f "renv.lock" ]; then
15+
if [ "${FORCE}" = true ] || [ ! -f "renv.lock" ]; then
1616
if grep -q 'source("renv/activate.R")' .Rprofile; then
1717
sed -i '' '/source("renv\/activate.R")/d' .Rprofile
1818
fi
@@ -23,7 +23,7 @@ initialise_r() {
2323
}
2424

2525
initialise_python() {
26-
if [ "$FORCE" = true ] || [ ! -f "requirements.txt" ]; then
26+
if [ "${FORCE}" = true ] || [ ! -f "requirements.txt" ]; then
2727
python3 -m venv .venv
2828
source .venv/bin/activate
2929
python3 -m pip install jupyter papermill
@@ -32,7 +32,7 @@ initialise_python() {
3232
}
3333

3434
initialise_uv() {
35-
if [ "$FORCE" = true ] || [ ! -f "uv.lock" ]; then
35+
if [ "${FORCE}" = true ] || [ ! -f "uv.lock" ]; then
3636
uv init --no-package --vcs none --bare --no-readme --author-from none
3737
uv venv
3838
source .venv/bin/activate
@@ -42,7 +42,7 @@ initialise_uv() {
4242
}
4343

4444
initialise_julia() {
45-
if [ "$FORCE" = true ] || [ ! -f "Project.toml" ]; then
45+
if [ "${FORCE}" = true ] || [ ! -f "Project.toml" ]; then
4646
julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()'
4747
julia --project=. -e 'using Pkg; Pkg.add("IJulia")'
4848
fi

0 commit comments

Comments
 (0)