diff options
| author | Igor Soarez <igor@soarez.org> | 2026-09-17 19:45:23 +0100 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-09-17 19:45:23 +0100 |
| commit | 13cc065ec014b86369dfe4ad60d1a43fa06fd251 (patch) | |
| tree | 684690c61b7b59758c2aac132c65b81c86de0608 /link/icloud.sh | |
dotfiles
Shell, editor and terminal configuration, the tools that go with them, and
szecret, an age-based secret manager whose store lives elsewhere.
History restarts here. What came before was not written to be read by
anyone else, and carried machine names, addresses and an encrypted secret
store; it is kept privately instead. What is left is meant to be safe on
any machine, including one whose owner is not me: see CLAUDE.md for the
rule it is written to.
Diffstat (limited to 'link/icloud.sh')
| -rwxr-xr-x | link/icloud.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/link/icloud.sh b/link/icloud.sh new file mode 100755 index 0000000..6daa287 --- /dev/null +++ b/link/icloud.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Short names for iCloud Drive, on a Mac signed into it. Dry run by default; +# pass `yes` to apply. + +set -euo pipefail + +# shellcheck source-path=SCRIPTDIR +# shellcheck source=lib.sh +source "$(dirname "$0")/lib.sh" "$@" + +# ~/.icloud is iCloud Drive itself and ~/.cloud its dotfiles folder, which holds +# what cannot go in a repo. ~/.cloud is load-bearing: hammerspoon reads its text +# snippets from ~/.cloud/shorts. +# +# These used to be made by ~/.cloud/link.sh, along with ~/.keys and ~/.ssh as +# links into iCloud. Those two are gone for good: ~/.ssh is a real local +# directory, and the one key still kept in iCloud is linked by a private layer. +if [[ -d "$icloud_dir" ]] +then + link "$icloud_dir" "$HOME/.icloud" + link "$icloud_dir/dotfiles" "$HOME/.cloud" +fi |
