fix_include_guards.sh 241 B

1234567891011
  1. #!/bin/sh
  2. for i in "$@"; do
  3. echo $i
  4. NAME=$(echo $i | sed "s/[\/\.]/_/g;s/^/HEADER_SUPERTUX_/" | tr [a-z] [A-Z])
  5. sed -i "s/^#ifndef .*_H_\$/#ifndef $NAME/" $i;
  6. sed -i "s/^#define .*_H_\$/#define $NAME/" $i;
  7. done
  8. # EOF #