Removed some old/unneeded shell scripts and formatted the rest

This commit is contained in:
Marko Korhonen 2022-09-16 20:08:03 +03:00
parent e45086afae
commit 4d323544d7
15 changed files with 51 additions and 369 deletions

View file

@ -31,14 +31,14 @@ if [ "$num_staged_lua" -gt 0 ]; then
fi
# Run shfmt on staged shell scripts
staged_sh=$(echo "$staged_files" | grep -E '(.sh$|pre-commit)' || true)
num_staged_sh=$(echo "$staged_sh" | grep -vce '^$' || true)
if [ "$num_staged_sh" -gt 0 ]; then
printf '\nFormatting %s staged shell scripts with shfmt\n' "$num_staged_sh"
shfmt -w "$staged_sh"
printf "Re-staging\n\n"
git add "$staged_sh"
fi
#staged_sh=$(echo "$staged_files" | grep -E '(.sh$|pre-commit)' || true)
#num_staged_sh=$(echo "$staged_sh" | grep -vce '^$' || true)
#if [ "$num_staged_sh" -gt 0 ]; then
# printf '\nFormatting %s staged shell scripts with shfmt\n' "$num_staged_sh"
# shfmt -w "$staged_sh"
# printf "Re-staging\n\n"
# git add "$staged_sh"
#fi
# Run prettier on all other staged files
# that are supported