Paul Bakker | 39daf66 | 2014-06-18 16:51:17 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Temporarily (de)ignore Makefiles generated by CMake to allow easier |
| 4 | # git development |
Bence Szépkúti | 468a76f | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 5 | # |
| 6 | # Copyright (C) 2014, Arm Limited, All Rights Reserved |
Bence Szépkúti | f744bd7 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 7 | # 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úti | 51b41d5 | 2020-05-26 01:54:15 +0200 | [diff] [blame] | 14 | # |
| 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úti | 468a76f | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 26 | # |
Bence Szépkúti | f744bd7 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 27 | # ********** |
| 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úti | 468a76f | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 48 | # This file is part of Mbed TLS (https://tls.mbed.org) |
Paul Bakker | 39daf66 | 2014-06-18 16:51:17 +0200 | [diff] [blame] | 49 | |
| 50 | IGNORE="" |
| 51 | |
| 52 | # Parse arguments |
| 53 | # |
| 54 | until [ -z "$1" ] |
| 55 | do |
| 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 |
| 79 | done |
| 80 | |
| 81 | if [ "X" = "X$IGNORE" ]; |
| 82 | then |
| 83 | [ $VERBOSE ] && echo "Ignoring Makefiles" |
| 84 | git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile |
| 85 | else |
| 86 | [ $VERBOSE ] && echo "Tracking Makefiles" |
| 87 | git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile |
| 88 | fi |