blob: 455f892a214cfb01d55df48f740e65a050133063 [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#
Bence Szépkúti1e148272020-08-07 13:07:28 +02006# Copyright The Mbed TLS Contributors
Dave Rodgman16799db2023-11-02 19:47:20 +00007# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
Paul Bakker39daf662014-06-18 16:51:17 +02008
9IGNORE=""
10
11# Parse arguments
12#
13until [ -z "$1" ]
14do
15 case "$1" in
16 -u|--undo)
17 IGNORE="0"
18 ;;
19 -v|--verbose)
20 # Be verbose
21 VERBOSE="1"
22 ;;
23 -h|--help)
24 # print help
25 echo "Usage: $0"
26 echo -e " -h|--help\t\tPrint this help."
27 echo -e " -u|--undo\t\tRemove ignores and continue tracking."
28 echo -e " -v|--verbose\t\tVerbose."
29 exit 1
30 ;;
31 *)
32 # print error
33 echo "Unknown argument: '$1'"
34 exit 1
35 ;;
36 esac
37 shift
38done
39
40if [ "X" = "X$IGNORE" ];
41then
42 [ $VERBOSE ] && echo "Ignoring Makefiles"
43 git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
44else
45 [ $VERBOSE ] && echo "Tracking Makefiles"
46 git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
47fi