mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
aider: Set ARG
based on the presence of a command line argument.
# 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 ```
This commit is contained in:
parent
2c50455000
commit
47346af823
1 changed files with 6 additions and 0 deletions
|
@ -3,5 +3,11 @@
|
|||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue