diff options
Diffstat (limited to 'scripts/upload_repo.sh')
-rw-r--r-- | scripts/upload_repo.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/upload_repo.sh b/scripts/upload_repo.sh new file mode 100644 index 0000000..3945c7d --- /dev/null +++ b/scripts/upload_repo.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +# Load environment variables from .env file +source .env + +# Define the working directory +WORKDIR=$(pwd) + +# Install AWS CLI if not already installed +if ! command -v aws &> /dev/null +then + echo "AWS CLI not found, installing..." + pip install awscli +fi + +# Configure AWS CLI to use the specified profile +export AWS_PROFILE=$AWS_PROFILE + +# Upload the APT repository to Cloudflare R2 +aws s3 sync "$WORKDIR/apt-repo" "s3://$BUCKET_NAME" --delete
\ No newline at end of file |