From 61ffa8466bbfa4ca8b13b442a3bd63ef9504a6da Mon Sep 17 00:00:00 2001
From: EuAndreh <eu@euandre.org>
Date: Wed, 30 Apr 2025 06:23:27 -0300
Subject: src/content/en/: Unpluralize collection names

---
 .../en/pastebin/2022/07/14/git-cleanup.adoc        | 59 ++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 src/content/en/pastebin/2022/07/14/git-cleanup.adoc

(limited to 'src/content/en/pastebin/2022/07/14/git-cleanup.adoc')

diff --git a/src/content/en/pastebin/2022/07/14/git-cleanup.adoc b/src/content/en/pastebin/2022/07/14/git-cleanup.adoc
new file mode 100644
index 0000000..b223f86
--- /dev/null
+++ b/src/content/en/pastebin/2022/07/14/git-cleanup.adoc
@@ -0,0 +1,59 @@
+= git-cleanup command
+
+[source,sh]
+----
+#!/bin/sh
+set -eu
+
+usage() {
+	cat <<-'EOF'
+		Usage:
+		  git cleanup
+		  git cleanup -h
+	EOF
+}
+
+help() {
+	cat <<-'EOF'
+
+		Options:
+		  -h, --help    show this message
+	EOF
+}
+
+for flag in "$@"; do
+	case "$flag" in
+		--)
+			break
+			;;
+		--help)
+			usage
+			help
+			exit
+			;;
+		*)
+			;;
+	esac
+done
+
+while getopts 'h' flag; do
+	case "$flag" in
+		h)
+			usage
+			help
+			exit
+			;;
+		*)
+			usage >&2
+			exit 2
+			;;
+	esac
+done
+shift $((OPTIND - 1))
+
+
+
+git branch --merged |
+	grep -v -e '^\*' -e '^. main$' |
+	xargs git branch -d
+----
-- 
cgit v1.2.3

