From: Oleg Broytman Date: Tue, 6 Feb 2024 22:15:24 +0000 (+0300) Subject: Style(unabsorbgitdirs): Use `[]` instead of `test` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=67095dc374f54bbcebba8be09dde45bf2cbb45ea;p=git-scripts.git Style(unabsorbgitdirs): Use `[]` instead of `test` --- 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