2023-05-30 20:48:03 +03:00
|
|
|
|
#!/bin/sh
|
2023-05-30 16:17:28 +03:00
|
|
|
|
|
2023-07-31 18:17:36 +03:00
|
|
|
|
#FIXME a `git init` type system would be better than a single directory :/
|
|
|
|
|
|
2023-05-30 20:48:03 +03:00
|
|
|
|
set -e
|
|
|
|
|
|
2023-07-30 15:00:35 +03:00
|
|
|
|
workspace_directory="${XDG_DOCUMENTS_DIR:-$HOME/Documents}/Auto-GPT"
|
2023-05-30 16:17:28 +03:00
|
|
|
|
|
2023-06-23 01:00:01 +03:00
|
|
|
|
# if the data|plugins directories don’t exist auto-gpt bails
|
2023-07-30 15:00:35 +03:00
|
|
|
|
mkdir -p "$workspace_directory"/data "$workspace_directory"/plugins
|
2023-05-30 16:17:28 +03:00
|
|
|
|
|
2023-07-31 18:17:36 +03:00
|
|
|
|
if ! test -f "$workspace_directory/prompt_settings.yaml"; then
|
|
|
|
|
cp "$VIRTUAL_ENV"/../share/prompt_settings.yaml "$workspace_directory"
|
|
|
|
|
fi
|
|
|
|
|
|
2023-05-30 16:17:28 +03:00
|
|
|
|
# change to this directory because auto-gpt assumes it is running
|
|
|
|
|
# in its own checkout and is not suitable to be run from anywhere
|
2023-07-30 15:00:35 +03:00
|
|
|
|
cd "$workspace_directory"
|
2023-05-08 16:39:44 +03:00
|
|
|
|
|
2023-07-30 15:00:35 +03:00
|
|
|
|
exec "$VIRTUAL_ENV"/bin/python -m autogpt --workspace-directory="$workspace_directory" "$@"
|