From bd3b9c6f98e238045baa88f0c9120b527099ad6d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 18 Jan 2019 06:12:29 +0300 Subject: [PATCH] Add scripts to run fsck of all repositories --- fsck | 2 ++ fsck-recursive | 8 ++++++++ fsck-repos | 9 +++++++++ 3 files changed, 19 insertions(+) create mode 100755 fsck create mode 100755 fsck-recursive create mode 100755 fsck-repos diff --git a/fsck b/fsck new file mode 100755 index 0000000..14f2ac5 --- /dev/null +++ b/fsck @@ -0,0 +1,2 @@ +#! /bin/sh +exec git fsck --strict diff --git a/fsck-recursive b/fsck-recursive new file mode 100755 index 0000000..3e47bd2 --- /dev/null +++ b/fsck-recursive @@ -0,0 +1,8 @@ +#! /bin/sh + +prog_dir="`dirname \"$0\"`" && +"$prog_dir"/fsck && + +if [ -f .gitmodules ]; then + exec git submodule foreach "$prog_dir"/fsck +fi diff --git a/fsck-repos b/fsck-repos new file mode 100755 index 0000000..a31c8bb --- /dev/null +++ b/fsck-repos @@ -0,0 +1,9 @@ +#! /bin/sh + +cd "`dirname \"$0\"`" && +prog_dir="`pwd`" && +export prog_dir + +exec "$prog_dir"/do-all \ + 'echo "----- $d -----" && cd "$d" &&' \ + '"$prog_dir"/fsck-recursive || exit 1' -- 2.39.5