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 |
Dave Rodgman | 7ff7965 | 2023-11-03 12:04:52 +0000 | [diff] [blame] | 7 | # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
Paul Bakker | 39daf66 | 2014-06-18 16:51:17 +0200 | [diff] [blame] | 8 | |
| 9 | IGNORE="" |
| 10 | |
| 11 | # Parse arguments |
| 12 | # |
| 13 | until [ -z "$1" ] |
| 14 | do |
| 15 | case "$1" in |
| 16 | -u|--undo) |
| 17 | IGNORE="0" |
| 18 | ;; |
| 19 | -v|--verbose) |
| 20 | # Be verbose |
| 21 | VERBOSE="1" |
| 22 | ;; |
| 23 | -h|--help) |
| 24 | # print help |
| 25 | echo "Usage: $0" |
| 26 | echo -e " -h|--help\t\tPrint this help." |
| 27 | echo -e " -u|--undo\t\tRemove ignores and continue tracking." |
| 28 | echo -e " -v|--verbose\t\tVerbose." |
| 29 | exit 1 |
| 30 | ;; |
| 31 | *) |
| 32 | # print error |
| 33 | echo "Unknown argument: '$1'" |
| 34 | exit 1 |
| 35 | ;; |
| 36 | esac |
| 37 | shift |
| 38 | done |
| 39 | |
| 40 | if [ "X" = "X$IGNORE" ]; |
| 41 | then |
| 42 | [ $VERBOSE ] && echo "Ignoring Makefiles" |
| 43 | git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile |
| 44 | else |
| 45 | [ $VERBOSE ] && echo "Tracking Makefiles" |
| 46 | git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile |
| 47 | fi |