view ifndef_wrapper.sh @ 1633:592a18dac250

Support servers without multiple user support (#76)
author Patrick Stewart <patstew@gmail.com>
date Wed, 20 Mar 2019 14:44:49 +0000
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/'