From: Oleg Broytman Date: Sun, 2 Aug 2020 22:52:02 +0000 (+0300) Subject: Feat: Check recursively for detached `HEAD` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=7bc56813eb2d43b7abe2a4c29b9b5a79d93e5077;p=git-scripts.git Feat: Check recursively for detached `HEAD` --- diff --git a/detached-head/check-detached-head b/detached-head/check-detached-head new file mode 100755 index 0000000..22471c5 --- /dev/null +++ b/detached-head/check-detached-head @@ -0,0 +1,2 @@ +#! /bin/sh +git symbolic-ref -q HEAD >/dev/null || pwd diff --git a/detached-head/check-detached-head-recursive b/detached-head/check-detached-head-recursive new file mode 100755 index 0000000..e184e40 --- /dev/null +++ b/detached-head/check-detached-head-recursive @@ -0,0 +1,4 @@ +#! /bin/sh + +prog_dir="`dirname \"$0\"`" && +exec "$prog_dir"/../run-recursive "$prog_dir"/check-detached-head diff --git a/detached-head/check-detached-head-repos b/detached-head/check-detached-head-repos new file mode 100755 index 0000000..5590d73 --- /dev/null +++ b/detached-head/check-detached-head-repos @@ -0,0 +1,7 @@ +#! /bin/sh + +cd "`dirname \"$0\"`" && +prog_dir="`pwd`" && +export prog_dir + +exec "$prog_dir"/../run-repos "$prog_dir"/check-detached-head-recursive