aboutsummaryrefslogblamecommitdiff
path: root/Mk/Scripts/sed_checked.sh
blob: 9c8c270f60998a37a39f9fb45e0c3b0a7e919658 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

         








                                                                                                              
      
    
#!/bin/sh

set -e
/usr/bin/sed -i.bak "$@"
for x in "${@}" ; do
    if [ -f "${x}" ]; then
	if cmp -s "${x}" "${x}".bak ; then
            if [ ! -z "${REWARNFILE}" ]; then
                echo - - REINPLACE_CMD ran, but did not modify file contents: ${x#${WRKSRC}/} >> ${REWARNFILE}
            fi
        fi
    fi
done