Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fix-gcc3.sh 536B

123456789101112131415161718
  1. #!/bin/sh
  2. if [ -f src/endian.h ]
  3. then
  4. echo GCC 3.x fix...
  5. mv src/endian.h src/mendian.h
  6. for i in `grep -l "endian.h" src/*.* src/*/*.*`; do mv $i $i.old && sed -e "s/endian.h/mendian.h/" $i.old > $i; done
  7. else
  8. echo Removing GCC 3.x fix...
  9. mv src/mendian.h src/endian.h
  10. for i in `grep -l "mendian.h" src/*.* src/*/*.*`; do mv $i $i.old && sed -e "s/mendian.h/endian.h/" $i.old > $i; done
  11. # for i in `find . -name "*.old"`; do echo $i > sed.0 && mv $i `sed -e "s/.old//" sed.0`; done
  12. #
  13. # rm -d sed.0
  14. fi