HCAI-Lab/w2-consensus-deepdive-unlearning-artifacts / social-data-attribution-w2 /scripts /bootstrap /with_r2_credentials.sh
| set -euo pipefail | |
| if [ "$#" -eq 0 ]; then | |
| echo "Usage: bash scripts/bootstrap/with_r2_credentials.sh <command> [args...]" >&2 | |
| exit 1 | |
| fi | |
| if ! command -v op >/dev/null 2>&1; then | |
| echo "Error: 1Password CLI (op) is not installed." >&2 | |
| exit 1 | |
| fi | |
| if ! op account list >/dev/null 2>&1; then | |
| echo "Error: 1Password CLI is not signed in." >&2 | |
| exit 1 | |
| fi | |
| vault="${OP_R2_VAULT:-Research}" | |
| item="${OP_R2_ITEM:-Cloudflare R2 API Credentials}" | |
| access_field="${OP_R2_ACCESS_KEY_FIELD:-access_key_id}" | |
| secret_field="${OP_R2_SECRET_ACCESS_KEY_FIELD:-secret_access_key}" | |
| export R2_ACCESS_KEY_ID | |
| export R2_SECRET_ACCESS_KEY | |
| R2_ACCESS_KEY_ID="$(op read "op://$vault/$item/$access_field")" | |
| R2_SECRET_ACCESS_KEY="$(op read "op://$vault/$item/$secret_field")" | |
| exec "$@" | |
Xet Storage Details
- Size:
- 797 Bytes
- Xet hash:
- ad7a215136871d51c3381c5547e34840f294feaee36a9b355f6ad9b7f87eb21e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.