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 | 700ee44 | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 5 | # |
| 6 | # Copyright (C) 2014, Arm Limited, All Rights Reserved |
Bence Szépkúti | c7da1fe | 2020-05-26 01:54:15 +0200 | [diff] [blame] | 7 | # 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úti | 700ee44 | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 20 | # |
| 21 | # This file is part of Mbed TLS (https://tls.mbed.org) |
Paul Bakker | 39daf66 | 2014-06-18 16:51:17 +0200 | [diff] [blame] | 22 | |
| 23 | IGNORE="" |
| 24 | |
| 25 | # Parse arguments |
| 26 | # |
| 27 | until [ -z "$1" ] |
| 28 | do |
| 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 |
| 52 | done |
| 53 | |
| 54 | if [ "X" = "X$IGNORE" ]; |
| 55 | then |
| 56 | [ $VERBOSE ] && echo "Ignoring Makefiles" |
| 57 | git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile |
| 58 | else |
| 59 | [ $VERBOSE ] && echo "Tracking Makefiles" |
| 60 | git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile |
| 61 | fi |