diff --git a/.bashrc b/.bashrc index 06b5612..50ea276 100644 --- a/.bashrc +++ b/.bashrc @@ -56,3 +56,20 @@ fi if [ -f /nfs/homes/tischmid/.config/synth-shell/better-history.sh ] && [ -n "$( echo $- | grep i )" ]; then source /nfs/homes/tischmid/.config/synth-shell/better-history.sh fi + +check () { + URL="${1}" + DIR="/tmp/tmp_repo_$(date +%s)" + + if [ -z "${URL}" ]; then + URL="$(git remote get-url origin)" + fi + + git clone --quiet "${URL}" "${DIR}" + if [ -d "${DIR}" ]; then + norminette "${DIR}" && printf '\033[42m%s\033[m\n' "Norminette success" || printf '\033[41m%s\033[m\n' "Norminette fail!!!" + rm -rf "${DIR}" + else + printf '\033[41m%s\033[m\n' "Could not clone the repo" + fi +} \ No newline at end of file