diff --git a/.bashrc b/.bashrc index 42125e3..d0dad10 100644 --- a/.bashrc +++ b/.bashrc @@ -11,6 +11,13 @@ alias gca='git add -u && git commit -m "Automatic add"' alias watch='watch -cn.1' alias push='git push origin master ; git push gitea master' alias norm='alacritty -e sh -c '\''git rev-parse --show-toplevel || { echo "Exiting in 5" ; sleep 1 ; echo "Exiting in 4" ; sleep 1 ; echo "Exiting in 3" ; sleep 1 ; echo "Exiting in 2" ; sleep 1 ; echo "Exiting in 1" ; sleep 1 ; } && cd "$(git rev-parse --show-toplevel)" && watch -cn.5 date \&\& norminette -R CheckForbiddenSourceHeader'\'' & disown' +norminette () { + version="$($(type -P norminette) -v | cut -d" " -f2)" + if [ ! "${version}" = "3.3.50" ]; then + printf "%s\n" "Your norminette version is not 3.3.50, but ${version}, which will not catch some indentation errors. Please up-/downgrade. Exiting" + fi + $(type -P norminette) "$@" +} jmp () { cd "$(find . -name "${1}" -not -wholename "*mouli*" -print -quit)" if [ "${?}" = "0" ] ; then @@ -80,7 +87,7 @@ check () { # Only proceed if clone success if [ -d "${DIR}" ] ; then # Check the norm and print beautiful message - norminette "${DIR}" && printf '\033[30;102m%s\033[m\n' "Norminette success" || printf '\033[30;101m%s\033[m\n' "Norminette fail!!!" + norminette -R CheckForbiddenSourceHeader "${DIR}" && printf '\033[30;102m%s\033[m\n' "Norminette success" || printf '\033[30;101m%s\033[m\n' "Norminette fail!!!" # Remove temp folder rm -rf "${DIR}"