Skip to content

Instantly share code, notes, and snippets.

@hirochachacha
Created October 4, 2011 08:04
Show Gist options
  • Save hirochachacha/1261116 to your computer and use it in GitHub Desktop.
Save hirochachacha/1261116 to your computer and use it in GitHub Desktop.
git-hook script for vimproc
#!/bin/sh --
set -e
echo ""
echo "START POST-MERGE HOOK"
echo ""
HOOK_DIR=`dirname $0` #git_hooks directory
PROC_DIR="$HOOK_DIR/../.." #vimproc directory
case `uname -s` in
Darwin)
MAKE_FILE='make_mac.mak'
PROC_FILE='proc.so'
;;
Linux)
MAKE_FILE='make_gcc.mak'
PROC_FILE='proc.so'
;;
FreeBSD)
MAKE_FILE='make_gcc.mak'
PROC_FILE='proc.so'
;;
CYGWIN*)
MAKE_FILE='make_cygwin.mak'
PROC_FILE='proc_cygwin.dll'
;;
*)
echo "This type of OS is not supported"
exit 1
;;
esac
cd $PROC_DIR
if [ -f autoload/$PROC_FILE ]; then
echo "deleting previous $PROC_FILE ..."
rm autoload/$PROC_FILE
echo "done"
echo ""
fi
echo "compiling $PROC_FILE ..."
make -f $MAKE_FILE
echo "done"
echo ""
echo "vimproc: build success!"
echo ""
echo "END POST-MERGE HOOK"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment