Commit 9a9c5b19 authored by treadway's avatar treadway

Deal with posix and non-posix tail command (SunOS quirk)


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@1492 18c085ea-50e0-402c-830e-de6fd14e8384
parent b4df8267
......@@ -2,8 +2,13 @@
# Do a little magic to run perl from anywhere in your path.
lines=`cat $0 | wc -l`
lines=`expr $lines - 10`
tail -$lines $0 > /tmp/visitperl$$
lines=`expr $lines - 16`
if [ "$checksys" != "SunOS" ]
then
tail -n $lines $0 > /tmp/visitperl$$
else
tail -$lines $0 > /tmp/visitperl$$
fi
echo "__END__" >> /tmp/visitperl$$
echo "$0 $*" >> /tmp/visitperl$$
exec perl /tmp/visitperl$$ $0 ${1+"$@"}
......
......@@ -35,7 +35,12 @@ function get_latest_rev
# This assumes a certain format for SVN log. It gets the second line,
# which has "r<REV> | ...", and then strips off the "| ...", and then
# strips off the 'r'.
# first check for old non posix tail command
if [ $(uname -s) != "SunOS" ] ; then
REV=$(svn log $VISIT_SVN_REPO --revision HEAD | head -n 2 | tail -n 1 | cut -d'|' -f1 | sed 's/r//g')
else
REV=$(svn log $VISIT_SVN_REPO --revision HEAD | head -2 | tail -1 | cut -d'|' -f1 | sed 's/r//g')
fi
if (( REV < 950 )) ; then
echo "An error occurred in getting revision!!" >&2
echo "Pursue this problem with a VisIt-SVN guru" >&2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment