News for hackers. Stuff that matters.
Re:Go upgrade Xcode. Fix your Git security hole by chris_wot on Saturday May 07, 2016 @10:10PM (#11652283)
Here's a better version:

  mkdir -p ~/xcls/usr/bin
  cat <<EOF > ~/xcls/usr/bin/xcrun
  #!/bin/sh
  if [ "\$1" = "git" ];
  then
     echo "Hello world!"
     exit \$?
  fi
    
  shift 1
  xcrun "\$@"
  exit \$?
  EOF
  chmod a+x ~/xcls/usr/bin/xcrun
  chflags hidden ~/xcls
  echo "export DEVELOPER_DIR=~/xcls/" >> ~/.bashrc
  export DEVELOPER_DIR=~/xcls/
Results in:

  630188s-iMac:testrun 5K$ git HelloWorld
  Hello world!

There are no comments on this comment yet.