lipo.sh 644 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. #
  3. # Lipo all the binaries together, if not already done
  4. #
  5. for FILE in megazeux mzxrun libcore.dylib \
  6. libeditor.dylib; do
  7. [ -f ${FILE} ] && continue
  8. if [ ! -f ${FILE}.i686 -a ! -f ${FILE}.ppc ]; then
  9. echo "Neither ${FILE}.i686 nor ${FILE}.ppc are present!"
  10. breakout 4
  11. fi
  12. if [ -f ${FILE}.i686 -a ! -f ${FILE}.ppc ]; then
  13. mv ${FILE}.i686 ${FILE}
  14. elif [ -f ${FILE}.ppc -a ! -f ${FILE}.i686 ]; then
  15. mv ${FILE}.ppc ${FILE}
  16. else
  17. lipo -create ${FILE}.i686 ${FILE}.ppc -output ${FILE}
  18. rm -f ${FILE}.i686 ${FILE}.ppc
  19. fi
  20. if [ ! -f ${FILE} ]; then
  21. echo "Failed to compile '${FILE}'.."
  22. breakout 5
  23. fi
  24. done