#!/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