Skip to content

Commit

Permalink
Fix sh spacing (#2192)
Browse files Browse the repository at this point in the history
  • Loading branch information
andf-viam authored Nov 9, 2023
1 parent 8c0f170 commit 4a87efb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/registry/create/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,19 +673,19 @@ Make sure to set up a Python virtual environment in the directory your module is
2. Add a shell script that creates a new virtual environment, installs the dependencies listed in `requirements.txt`, and runs the module entry point file `main.py`:

```sh { class="command-line" data-prompt="$"}
#!/bin/sh
cd `dirname $0`
#!/bin/sh
cd `dirname $0`

# Create a virtual environment to run our code
VENV_NAME="venv"
PYTHON="$VENV_NAME/bin/python"
# Create a virtual environment to run our code
VENV_NAME="venv"
PYTHON="$VENV_NAME/bin/python"

python3 -m venv $VENV_NAME
$PYTHON -m pip install -r requirements.txt -U # remove -U if viam-sdk should not be upgraded whenever possible
python3 -m venv $VENV_NAME
$PYTHON -m pip install -r requirements.txt -U # remove -U if viam-sdk should not be upgraded whenever possible

# Be sure to use `exec` so that termination signals reach the python process,
# or handle forwarding termination signals manually
exec $PYTHON <your-src-dir-if-inside>/main.py $@
# Be sure to use `exec` so that termination signals reach the python process,
# or handle forwarding termination signals manually
exec $PYTHON <your-src-dir-if-inside>/main.py $@
```

To make your shell script executable, run the following command in your terminal:
Expand Down

0 comments on commit 4a87efb

Please sign in to comment.