Compare commits

..

2 Commits

Author SHA1 Message Date
Timo Schmidt 58df9f5969 Merge branch 'dev' 2023-05-09 02:06:52 +02:00
Timo Schmidt f9ca2c81b7 Automatic add 2023-05-09 01:59:15 +02:00
1 changed files with 14 additions and 14 deletions

26
.bashrc
View File

@ -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 () {