blob: 7da7acdc32d1ee6279fb769044de4778d361ed5e [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úti468a76f2020-05-26 00:33:31 +02005#
6# Copyright (C) 2014, Arm Limited, All Rights Reserved
Bence Szépkútif744bd72020-06-05 13:02:18 +02007# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
8#
9# This file is provided under the Apache License 2.0, or the
10# GNU General Public License v2.0 or later.
11#
12# **********
13# Apache License 2.0:
Bence Szépkúti51b41d52020-05-26 01:54:15 +020014#
15# Licensed under the Apache License, Version 2.0 (the "License"); you may
16# not use this file except in compliance with the License.
17# You may obtain a copy of the License at
18#
19# http://www.apache.org/licenses/LICENSE-2.0
20#
21# Unless required by applicable law or agreed to in writing, software
22# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
23# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24# See the License for the specific language governing permissions and
25# limitations under the License.
Bence Szépkúti468a76f2020-05-26 00:33:31 +020026#
Bence Szépkútif744bd72020-06-05 13:02:18 +020027# **********
28#
29# **********
30# GNU General Public License v2.0 or later:
31#
32# This program is free software; you can redistribute it and/or modify
33# it under the terms of the GNU General Public License as published by
34# the Free Software Foundation; either version 2 of the License, or
35# (at your option) any later version.
36#
37# This program is distributed in the hope that it will be useful,
38# but WITHOUT ANY WARRANTY; without even the implied warranty of
39# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40# GNU General Public License for more details.
41#
42# You should have received a copy of the GNU General Public License along
43# with this program; if not, write to the Free Software Foundation, Inc.,
44# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
45#
46# **********
47#
Bence Szépkúti468a76f2020-05-26 00:33:31 +020048# This file is part of Mbed TLS (https://tls.mbed.org)
Paul Bakker39daf662014-06-18 16:51:17 +020049
50IGNORE=""
51
52# Parse arguments
53#
54until [ -z "$1" ]
55do
56 case "$1" in
57 -u|--undo)
58 IGNORE="0"
59 ;;
60 -v|--verbose)
61 # Be verbose
62 VERBOSE="1"
63 ;;
64 -h|--help)
65 # print help
66 echo "Usage: $0"
67 echo -e " -h|--help\t\tPrint this help."
68 echo -e " -u|--undo\t\tRemove ignores and continue tracking."
69 echo -e " -v|--verbose\t\tVerbose."
70 exit 1
71 ;;
72 *)
73 # print error
74 echo "Unknown argument: '$1'"
75 exit 1
76 ;;
77 esac
78 shift
79done
80
81if [ "X" = "X$IGNORE" ];
82then
83 [ $VERBOSE ] && echo "Ignoring Makefiles"
84 git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
85else
86 [ $VERBOSE ] && echo "Tracking Makefiles"
87 git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile
88fi