build_images.sh 394 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. BASE=.$$images.h
  3. FINAL=images.h
  4. ansi-to-src ansi/*.ans > $BASE
  5. # workaround
  6. if [ -f "$FINAL" ]; then
  7. # file exists
  8. diff -q $BASE $FINAL
  9. status=$?
  10. if [ $status -eq 0 ]; then
  11. echo "no change..."
  12. # Clean up temp file
  13. rm -f $BASE
  14. else
  15. mv -f $BASE $FINAL
  16. fi
  17. else
  18. # file doesn't exist, so no choice by to copy it over.
  19. mv -f $BASE $FINAL
  20. fi