13
0
livetrax/tools/once

8 lines
240 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
for x in *.h ; do
sed -i -e 's/^#ifndef *__[a-z_][a-z_]*_h__/#pragma once/' -e '/^#define *__[a-z_][a-z_]*_h__/d' -e '/^#endif *\/\* __[a-z_][a-z_]*_h__.*$/d' -e '/^#endif *\/\/ *__[a-z_][a-z_]*_h__.*$/d' $x
done
exit 0