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 | # |
Bence Szépkúti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame^] | 6 | # Copyright The Mbed TLS Contributors |
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. |
Paul Bakker | 39daf66 | 2014-06-18 16:51:17 +0200 | [diff] [blame] | 20 | |
| 21 | IGNORE="" |
| 22 | |
| 23 | # Parse arguments |
| 24 | # |
| 25 | until [ -z "$1" ] |
| 26 | do |
| 27 | case "$1" in |
| 28 | -u|--undo) |
| 29 | IGNORE="0" |
| 30 | ;; |
| 31 | -v|--verbose) |
| 32 | # Be verbose |
| 33 | VERBOSE="1" |
| 34 | ;; |
| 35 | -h|--help) |
| 36 | # print help |
| 37 | echo "Usage: $0" |
| 38 | echo -e " -h|--help\t\tPrint this help." |
| 39 | echo -e " -u|--undo\t\tRemove ignores and continue tracking." |
| 40 | echo -e " -v|--verbose\t\tVerbose." |
| 41 | exit 1 |
| 42 | ;; |
| 43 | *) |
| 44 | # print error |
| 45 | echo "Unknown argument: '$1'" |
| 46 | exit 1 |
| 47 | ;; |
| 48 | esac |
| 49 | shift |
| 50 | done |
| 51 | |
| 52 | if [ "X" = "X$IGNORE" ]; |
| 53 | then |
| 54 | [ $VERBOSE ] && echo "Ignoring Makefiles" |
| 55 | git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile |
| 56 | else |
| 57 | [ $VERBOSE ] && echo "Tracking Makefiles" |
| 58 | git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile |
| 59 | fi |