From 67095dc374f54bbcebba8be09dde45bf2cbb45ea Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 7 Feb 2024 01:15:24 +0300 Subject: [PATCH] Style(unabsorbgitdirs): Use `[]` instead of `test` --- submodules/unabsorbgitdirs | 4 ++-- submodules/unabsorbgitdirs-recursive | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/submodules/unabsorbgitdirs b/submodules/unabsorbgitdirs index 2416477..8625040 100755 --- a/submodules/unabsorbgitdirs +++ b/submodules/unabsorbgitdirs @@ -7,9 +7,9 @@ cd "`git rev-parse --show-toplevel`" unset GIT_DIR # If .git/ subdirectory is already here -test -d .git && exit 0 +[ -d .git ] && exit 0 -if ! test -f .git; then +if ! [ -f .git ]; then echo "Error: Cannot find gitlink, aborting" >&2 exit 1 fi diff --git a/submodules/unabsorbgitdirs-recursive b/submodules/unabsorbgitdirs-recursive index 72b4464..b6ff9cc 100755 --- a/submodules/unabsorbgitdirs-recursive +++ b/submodules/unabsorbgitdirs-recursive @@ -18,14 +18,14 @@ cd "`git rev-parse --show-toplevel`" unset GIT_DIR # If .git/ subdirectory is already here -test -d .git && exit 0 +[ -d .git ] && exit 0 -if ! test -f .git; then +if ! [ -f .git ]; then echo "Error: Cannot find gitlink, aborting" >&2 exit 1 fi -if test -f .gitmodules; then +if [ -f .gitmodules ]; then git submodule foreach "$PROG_DIR"/"`basename \"$0\"`" fi -- 2.39.2