Merge branch 'dev'
This commit is contained in:
commit
58df9f5969
26
.bashrc
26
.bashrc
|
@ -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 () {
|
||||||
|
|
Loading…
Reference in New Issue