1#!/bin/bash 2 3# Temporarily (de)ignore Makefiles generated by CMake to allow easier 4# git development 5# 6# Copyright The Mbed TLS Contributors 7# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 8 9IGNORE="" 10 11# Parse arguments 12# 13until [ -z "$1" ] 14do 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 38done 39 40if [ "X" = "X$IGNORE" ]; 41then 42 [ $VERBOSE ] && echo "Ignoring Makefiles" 43 git update-index --assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile 44else 45 [ $VERBOSE ] && echo "Tracking Makefiles" 46 git update-index --no-assume-unchanged Makefile library/Makefile programs/Makefile tests/Makefile 47fi 48