diff --git a/scripts/upload-s3.sh b/scripts/upload-s3.sh index eaa9a03b..346391cb 100755 --- a/scripts/upload-s3.sh +++ b/scripts/upload-s3.sh @@ -1,3 +1,6 @@ #!/bin/sh +# Remove any files that could contain search results from a search API +grep -c "URL:" "${TMPDIR}"/gptscript-state* | grep -v ":0" | cut -d ':' -f1 | xargs rm + find $TMPDIR -maxdepth 1 -type f -name 'gptscript-state*' -mtime -7 | xargs -I{} aws s3 cp {} s3://gptscript-state/