Ignore:
Timestamp:
Jan 26, 2016, 6:32:09 PM (9 years ago)
Author:
lguez
Message:

Make the script more robust.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/tools/diffdef.sh

    r2412 r2426  
    22# Author: Lionel GUEZ
    33
    4 # This script compares files "*.def" other than "traceur.def" and
     4# This script compares files "*.def" other than "*traceur.def" and
    55# "out.def" in two directories.
    66
     
    4444  rm -f all.def
    4545  echo "def files in $my_directory:"
    46   ls !(traceur|out).def
     46  ls !(*traceur|out).def
    4747
    4848  # Concatenate and format the def files:
    49   cat !(traceur|out).def | tr -d " " | grep -v -E '(^#|^!|INCLUDEDEF|^$)' \
     49  cat !(*traceur|out).def | tr '\r' '\n' | tr -d " " \
     50      | grep -v -E '(^#|^!|INCLUDEDEF|^$)' \
    5051      | tr '[:lower:]' '[:upper:]' | sed 's/=[NF]$/=FALSE/' \
    5152      | sed 's/=[YT]$/=TRUE/' | sort >all.def
Note: See TracChangeset for help on using the changeset viewer.