Last active
August 29, 2015 14:09
-
-
Save abock/1cdd21adf1a7649c779b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
nogitdir="/tmp/nogitsubmodulesfrommake" | |
mkdir -p "$nogitdir" | |
git="$(which git)" | |
{ cat <<EOF | |
#!/usr/bin/env bash | |
if [ "\$1" = "submodule" ]; then | |
echo "*** INSANITY: someone is messing with git submodules in a Makefile" | |
echo "*** not running this command:" | |
echo "***" | |
echo "*** git \$*" | |
echo "***" | |
sleep 2 | |
else | |
"$git" \$* | |
fi | |
EOF | |
} > "$nogitdir/git" | |
chmod +x "$nogitdir/git" | |
PATH="$nogitdir:$PATH" make "$*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment