view ifndef_wrapper.sh @ 1645:0276c0f8c2b8

use "openssl sha256"
author Matt Johnston <matt@ucc.asn.au>
date Sat, 23 Mar 2019 21:45:00 +0800
parents 0196f4f83fee
children
line wrap: on
line source

#!/bin/sh

# Wrap all "#define X Y" with a #ifndef X...#endif"

sed 's/^\( *#define \([^ ][^ ]*\) .*\)/#ifndef \2\
\1\
#endif/'