blob: 1a165408ed759583957007079b8aa98c60c7346c [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
Bence Szépkútic7da1fe2020-05-26 01:54:15 +02007# SPDX-License-Identifier: Apache-2.0
8#
9# Licensed under the Apache License, Version 2.0 (the "License"); you may
10# not use this file except in compliance with the License.
11# You may obtain a copy of the License at
12#
13# http://www.apache.org/licenses/LICENSE-2.0
14#
15# Unless required by applicable law or agreed to in writing, software
16# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18# See the License for the specific language governing permissions and
19# limitations under the License.
Bence Szépkúti700ee442020-05-26 00:33:31 +020020#
21# This file is part of Mbed TLS (https://tls.mbed.org)
Paul Bakker39daf662014-06-18 16:51:17 +020022
23IGNORE=""
24
25# Parse arguments
26#
27until [ -z "$1" ]
28do
29 case "$1" in
30 -u|--undo)
31 IGNORE="0"
32 ;;
33 -v|--verbose)
34 # Be verbose
35 VERBOSE="1"
36 ;;
37 -h|--help)
38 # print help
39 echo "Usage: $0"
40 echo -e " -h|--help\t\tPrint this help."
41 echo -e " -u|--undo\t\tRemove ignores and continue tracking."
42 echo -e " -v|--verbose\t\tVerbose."
43 exit 1
44 ;;
45 *)
46 # print error
47 echo "Unknown argument: '$1'"
48 exit 1
49 ;;
50 esac
51 shift
52done
53
54if [ "X" = "X$IGNORE" ];
55then
56 [ $VERBOSE ] && echo "Ignoring Makefiles"
57 git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
58else
59 [ $VERBOSE ] && echo "Tracking Makefiles"
60 git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
61fi