diff --git a/.bashrc b/.bashrc index dd5c623..cf4851b 100644 --- a/.bashrc +++ b/.bashrc @@ -137,27 +137,27 @@ fi check () { # Set params - URL="${1}" - DIR="/tmp/tmp_repo_$(date +%s)" + URL="${1}" + DIR="/tmp/tmp_repo_$(date +%s)" # If no URL, get it from current repo - if [ -z "${URL}" ] ; then - URL="$(git remote get-url origin)" - fi + if [ -z "${URL}" ] ; then + URL="$(git remote get-url origin)" + fi # Clone in temp folder - git clone --quiet "${URL}" "${DIR}" + git clone --quiet "${URL}" "${DIR}" # Only proceed if clone success - if [ -d "${DIR}" ] ; then - # Check the norm and print beautiful message - norminette -R CheckForbiddenSourceHeader "${DIR}" && printf '\033[30;102m%s\033[m\n' "Norminette success" || printf '\033[30;101m%s\033[m\n' "Norminette fail!!!" + if [ -d "${DIR}" ] ; then + # Check the norm and print beautiful message + 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}" - else - printf '\033[30;101m%s\033[m\n' "Could not clone the repo" - fi + rm -rf "${DIR}" + else + printf '\033[30;101m%s\033[m\n' "Could not clone the repo" + fi } safe_guard_name () { @@ -277,7 +277,7 @@ timoulinette () { printf '%s\n' "Could not compile. Exiting" return fi - + # Delete testfile if [ "$(printf '%s' "${extras}" | sed 's/keep-test//g')" = "${extras}" ] ; then rm -f -- "${download_file_name}"