Skip to content

Commit

Permalink
chore: update install.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Liu <[email protected]>
  • Loading branch information
apepkuss committed Dec 19, 2024
1 parent 50d081b commit 3f8cc8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,16 @@ if [ -d "$gaianet_base_dir" ]; then
# backup config.json
if [ -f "$gaianet_base_dir/config.json" ]; then
printf " * Copy config.json to $gaianet_base_dir/backup/\n"
cp $gaianet_base_dir/config.json $gaianet_base_dir/backup/

# check if context_window is present in config.json
if ! grep -q '"context_window":' config.json; then
if ! grep -q '"context_window":' $gaianet_base_dir/config.json; then
sed_in_place '2i\
"context_window": "1",
' "$gaianet_base_dir/config.json"
fi

cp $gaianet_base_dir/config.json $gaianet_base_dir/backup/

else
error "Failed to copy the config.json. Reason: the config.json does not exist in $gaianet_base_dir."
exit 1
Expand Down

0 comments on commit 3f8cc8d

Please sign in to comment.