quagga-memtypes.sh 433 B

12345678910111213141516171819202122
  1. #! /bin/bash
  2. #
  3. # Check lib/memtypes.h from Quagga
  4. #
  5. # Run from quagga's top dir as:
  6. # ./pimd/quagga-memtypes.sh
  7. #
  8. # $QuaggaId: $Format:%an, %ai, %h$ $
  9. me=`basename $0`
  10. msg () {
  11. echo >&2 $me: $*
  12. }
  13. memtypes_h=lib/memtypes.h
  14. if [ -e $memtypes_h ]; then
  15. memtypes_h_size=`ls -s $memtypes_h | cut -d' ' -f1`
  16. if [ "$memtypes_h_size" -lt 1 ]; then
  17. msg WARNING: removing empty file: $memtypes_h -- awk failed?
  18. rm $memtypes_h
  19. fi
  20. fi