From 5c2d06c5fce17a60871941049739875d8fd26db8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 10 Nov 2025 14:01:25 +0100 Subject: [PATCH] Automate the rclone config --- bin/omarchy-iso-rclone-config | 14 ++++++++++++++ bin/omarchy-iso-upload | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 bin/omarchy-iso-rclone-config diff --git a/bin/omarchy-iso-rclone-config b/bin/omarchy-iso-rclone-config new file mode 100755 index 0000000..9ef5b0f --- /dev/null +++ b/bin/omarchy-iso-rclone-config @@ -0,0 +1,14 @@ +#!/bin/bash + +access_key=$(op read "op://Shared/Cloudflare Buckets/iso.omarchy.org/access_key_id" --account Omarchy) +secret_access_key=$(op read "op://Shared/Cloudflare Buckets/iso.omarchy.org/secret_access_key" --account Omarchy) +endpoint=$(op read "op://Shared/Cloudflare Buckets/iso.omarchy.org/endpoint" --account Omarchy) + +cat > ~/.config/rclone/rclone.conf << EOF +[Omarchy] +type = s3 +provider = Cloudflare +access_key_id = $access_key +secret_access_key = $secret_access_key +endpoint = $endpoint +EOF diff --git a/bin/omarchy-iso-upload b/bin/omarchy-iso-upload index 1cc13ee..a154858 100755 --- a/bin/omarchy-iso-upload +++ b/bin/omarchy-iso-upload @@ -6,7 +6,7 @@ if [ $# -eq 0 ]; then fi if [[ ! -f ~/.config/rclone/rclone.conf ]]; then - echo "You must first configure rclone with the R2 credentials: rclone config" + echo "You must first configure rclone with the R2 credentials: omarchy-iso-rclone-config" exit 1 fi