blob: df9450e14fcb885b722761ef283d1b502e0944e7 [file] [log] [blame]
Paul Bakker39daf662014-06-18 16:51:17 +02001#!/bin/bash
2
3# Temporarily (de)ignore Makefiles generated by CMake to allow easier
4# git development
5
6IGNORE=""
7
8# Parse arguments
9#
10until [ -z "$1" ]
11do
12 case "$1" in
13 -u|--undo)
14 IGNORE="0"
15 ;;
16 -v|--verbose)
17 # Be verbose
18 VERBOSE="1"
19 ;;
20 -h|--help)
21 # print help
22 echo "Usage: $0"
23 echo -e " -h|--help\t\tPrint this help."
24 echo -e " -u|--undo\t\tRemove ignores and continue tracking."
25 echo -e " -v|--verbose\t\tVerbose."
26 exit 1
27 ;;
28 *)
29 # print error
30 echo "Unknown argument: '$1'"
31 exit 1
32 ;;
33 esac
34 shift
35done
36
37if [ "X" = "X$IGNORE" ];
38then
39 [ $VERBOSE ] && echo "Ignoring Makefiles"
40 git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
41else
42 [ $VERBOSE ] && echo "Tracking Makefiles"
43 git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
44fi