From 470fe23ab4a894af4749bcd13ca3fe97a83111f5 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Tue, 21 Feb 2023 01:04:38 +0800 Subject: [PATCH] Create script for managing code-specific content --- bin/switch-content-orphan-branch | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 bin/switch-content-orphan-branch diff --git a/bin/switch-content-orphan-branch b/bin/switch-content-orphan-branch new file mode 100644 index 0000000..65c478c --- /dev/null +++ b/bin/switch-content-orphan-branch @@ -0,0 +1,7 @@ +#!/usr/bin/env nix-shell +#! nix-shell -p findutils coreutils git fzf -i bash + +find ./content/ -mindepth 2 -iname 'index.adoc' -printf '%P\n' \ + | xargs dirname \ + | fzf --prompt "Choose orphan content branch " --filepath-word --info=hidden \ + | xargs git switch --orphan