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