From e2a759b7ba009f6d095524b64634eb47aa87b206 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 20 Mar 2025 11:37:03 +0300 Subject: [PATCH] Add script `init` The primary goal is to automatically add the new repository to `locate-all.list`. --- init | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 init diff --git a/init b/init new file mode 100755 index 0000000..849ba89 --- /dev/null +++ b/init @@ -0,0 +1,17 @@ +#! /bin/sh + +if [ -n "$2" ]; then + echo "Usage: $0 [subdir]" >&2 + exit 1 +fi + +set -e +subdir="$1" + +if [ -n "$subdir" ]; then + mkdir -p "$subdir" + cd "$subdir" +fi + +git init +pwd >> "`dirname \"$0\"`"/locate-all.list -- 2.39.5