Skip to content

Instantly share code, notes, and snippets.

View henrjk's full-sized avatar

Henrich Krämer henrjk

View GitHub Profile
@henrjk
henrjk / idempotent-cp-tree-test-1.sh
Created February 18, 2022 08:14
Copy directory tree with cp
#!/bin/bash
set -eu
# this script is meant to be run on macos with gnu cp avalable via gcp (brew install coreutils)
# and macs own cp as cp
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"