Skip to content

Commit

Permalink
.hooks/*: verify std.sh instead of shellverbose.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
XPhyro committed Feb 15, 2024
1 parent d984328 commit f8e367c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .hooks/has-shellverbose.c → .hooks/has-std-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ int main(int argc, char *argv[])
break;
}

if (strcmp(line + i, "shellverbose.sh")) {
printf("File %s does not have shellverbose.sh at the top\n", filename);
if (strcmp(line + i, "std.sh")) {
printf("File %s does not have std.sh at the top\n", filename);
ret = EXIT_FAILURE;
}
} else {
printf("File %s does not have shellverbose.sh at the top\n", filename);
printf("File %s does not have std.sh at the top\n", filename);
ret = EXIT_FAILURE;
}

Expand Down
2 changes: 1 addition & 1 deletion .hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ printf "%s\n" "$changed_files" \
printf "%s\n" "$changed_files" \
| grep "^src/sh/.*[^/]" \
| grep -v '\.sh$' \
| xargs -r -d '\n' -n 1 .hooks/has-shellverbose.c
| xargs -r -d '\n' -n 1 .hooks/has-std-sh.c

current_year="$(date '+%Y')"
grep -Fq -- "2020-$current_year" LICENSE \
Expand Down

0 comments on commit f8e367c

Please sign in to comment.