Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions bin/nextcloud-sync
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail

if [[ "${1:-}" == "-h" ]] || [[ "${1:-}" == "--help" ]]; then
cat <<EOF
Usage: nextcloud-sync [--resync]

Sync Nextcloud to ~/nextcloud using rclone bisync, excluding the transmission folder.

Options:
--resync Force resync (required for first run or after errors)

Examples:
nextcloud-sync - Normal bidirectional sync
nextcloud-sync --resync - Force resync from scratch
EOF
exit 0
fi

RESYNC_FLAG=""
if [[ "${1:-}" == "--resync" ]]; then
RESYNC_FLAG="--resync"
fi

mkdir -p ~/nextcloud

rclone bisync nextcloud: ~/nextcloud --exclude "transmission/**" $RESYNC_FLAG
1 change: 1 addition & 0 deletions mac/packages
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ torsocks
tree
typescript-language-server
uv
watch
xq
yamllint
yt-dlp
Expand Down
5 changes: 5 additions & 0 deletions rclone/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

# Populate rclone config from KeePassXC database
"$DOTFILES_HOME/bin/update-secrets" rclone