Hi Folks,

  It would be nice if when I execute: msp430-gcc -v
  I could see the CVS checkout timestamp, this way, I could know if my
mspgcc is uptodate.

  I implemented a simple shell script to get the last CVS timestamp and
generate a file.h with a define that could be used by the configure/make
scripts.

  What do you think about this?

  Thanks,
    Pedro

Shell script below

#! /bin/sh

TMP1="/tmp/mspgcc-newer-1"
TMP2="/tmp/mspgcc-newer-2"
cat /dev/null > $TMP1
cat /dev/null > $TMP2
for i in `find . -name Entries`; do
    echo "Searching: $i"
    egrep '^/.*/.*/.*/.*/' $i | cut -d '/' -f 4 >> $TMP1
done

while read x; do
    date --utc --date="$x" '+%Y-%m-%d %H:%M:%S' >> $TMP2
done < $TMP1

LAST=`cat $TMP2 | sort | tail -n 1`
rm -f $TMP1 $TMP2

echo $LAST > last-cvs-checkout
echo "LASTCVSCHECKOUT='$LAST'" > last-cvs-checkout.sh
echo "#define LASTCVSCHECKOUT \"$LAST\"" > last-cvs-checkout.h

Reply via email to