diff options
| author | Alec Goncharow <alec@goncharow.dev> | 2024-02-29 23:13:09 -0500 |
|---|---|---|
| committer | Alec Goncharow <alec@goncharow.dev> | 2024-02-29 23:13:09 -0500 |
| commit | 5ba9ee911da22937f834694fe00d0070523c691c (patch) | |
| tree | 218c101fda1c700c788b191fe17da4a7ef3775e9 /bin/nocheckin | |
| parent | 82092fe19a0ff0d0e4bed2ccfd4351cbb2d10d9e (diff) | |
be bashthonic
Diffstat (limited to 'bin/nocheckin')
| -rwxr-xr-x | bin/nocheckin | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/nocheckin b/bin/nocheckin index 8f3779b..b0c778c 100755 --- a/bin/nocheckin +++ b/bin/nocheckin @@ -18,11 +18,6 @@ CL_NONE='\e[0m' MESSAGE_0="${CL_BRED}Error:${CL_NONE} $SEARCH_TARGET(s) were found in " MESSAGE_1="file(s) - ${CL_BRED}ignoring commit:${CL_NONE}" -_=$(git status) -if [ $? -ne 0 ]; then - exit 1; -fi - SEARCH_CMD="git diff --staged -i --diff-filter=d --name-only -G $SEARCH_TARGET --relative $PWD" GREP_CMD="grep -H $SEARCH_TARGET -n --color=always" # <filename>:line****** @@ -31,7 +26,7 @@ GREP_CMD="grep -H $SEARCH_TARGET -n --color=always" # <filename>:line****** STATUS=$($SEARCH_CMD | wc -l) if ((STATUS > 0)); then - echo -e $MESSAGE_0 $STATUS $MESSAGE_1; - ($SEARCH_CMD | xargs $GREP_CMD); + echo -e "$MESSAGE_0" "$STATUS" "$MESSAGE_1"; + ($SEARCH_CMD | xargs "$GREP_CMD"); exit 1; fi |
