blob: 543e44abcab1b5eb3bb825a3961e092b07e6cae8 [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
Bence Szépkúti700ee442020-05-26 00:33:31 +02005#
6# Copyright (C) 2014, Arm Limited, All Rights Reserved
7#
8# This file is part of Mbed TLS (https://tls.mbed.org)
Paul Bakker39daf662014-06-18 16:51:17 +02009
10IGNORE=""
11
12# Parse arguments
13#
14until [ -z "$1" ]
15do
16 case "$1" in
17 -u|--undo)
18 IGNORE="0"
19 ;;
20 -v|--verbose)
21 # Be verbose
22 VERBOSE="1"
23 ;;
24 -h|--help)
25 # print help
26 echo "Usage: $0"
27 echo -e " -h|--help\t\tPrint this help."
28 echo -e " -u|--undo\t\tRemove ignores and continue tracking."
29 echo -e " -v|--verbose\t\tVerbose."
30 exit 1
31 ;;
32 *)
33 # print error
34 echo "Unknown argument: '$1'"
35 exit 1
36 ;;
37 esac
38 shift
39done
40
41if [ "X" = "X$IGNORE" ];
42then
43 [ $VERBOSE ] && echo "Ignoring Makefiles"
44 git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
45else
46 [ $VERBOSE ] && echo "Tracking Makefiles"
47 git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
48fi