Merge branch 'dev'

This commit is contained in:
Timo Schmidt 2023-05-09 02:06:52 +02:00
commit 58df9f5969
1 changed files with 14 additions and 14 deletions

28
.bashrc
View File

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