mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00

# Aider chat conversation: USER: if no cmd line arg, set ARG=-r otherwise set ARG=$1 ASSISTANT: Here is the required change to set `ARG` based on the presence of a command line argument: scripts/update-docs.sh ```bash <<<<<<< SEARCH # exit when any command fails set -e cog $ARG website/index.md cog $ARG website/docs/usage.md ======= # exit when any command fails set -e if [ -z "$1" ]; then ARG=-r else ARG=$1 fi cog $ARG website/index.md cog $ARG website/docs/usage.md >>>>>>> REPLACE ```
13 lines
156 B
Bash
Executable file
13 lines
156 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# exit when any command fails
|
|
set -e
|
|
|
|
if [ -z "$1" ]; then
|
|
ARG=-r
|
|
else
|
|
ARG=$1
|
|
fi
|
|
|
|
cog $ARG website/index.md
|
|
cog $ARG website/docs/usage.md
|