diff --git a/tools/once b/tools/once new file mode 100755 index 0000000000..03c0d467aa --- /dev/null +++ b/tools/once @@ -0,0 +1,7 @@ +#!/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