summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-01-31 06:03:28 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-01-31 06:03:28 (GMT)
commit11efb889c6847da265daf34624b6b13667ad7f42 (patch)
tree765bc38aac5a9c4bd3492e653ee05ff640375432
parentc6da08f99452b1e945f8d0c6fb50b549104fdb4f (diff)
downloadhdf5-11efb889c6847da265daf34624b6b13667ad7f42.zip
hdf5-11efb889c6847da265daf34624b6b13667ad7f42.tar.gz
hdf5-11efb889c6847da265daf34624b6b13667ad7f42.tar.bz2
[svn-r3336] Purpose:
Simple twist Description: snapshot used to just use whatever `hostname` returns. Often it is the fully qualified name but sometimes just hostname without the domain part. Inconsistent. Solution: Chopped off any domain part and use just the host name. Use the 'cut' command rather than the sed with ncsa.uiuc.edu hardcoded. Applied that to runtest too. Platforms tested: Should work. Will find out if the daily tests still work.
-rwxr-xr-xbin/runtest2
-rwxr-xr-xbin/snapshot9
2 files changed, 6 insertions, 5 deletions
diff --git a/bin/runtest b/bin/runtest
index 8f90e51..42c8ac1 100755
--- a/bin/runtest
+++ b/bin/runtest
@@ -29,7 +29,7 @@ TOWHOM=${DEBUGMODE:+acheng}
TOWHOM=${TOWHOM:-hdf5lib@ncsa.uiuc.edu}
# Setup
-HOSTNAME=`hostname | sed -e s/.ncsa.uiuc.edu//`
+HOSTNAME=`hostname | cut -f1 -d.` # no domain part
H5DIR=$HOME/HDF5/v_1_3/hdf5
TODAY=`date +%y%m%d`
H5VER= # default to current CVS version
diff --git a/bin/snapshot b/bin/snapshot
index c5ec605..7883e79 100755
--- a/bin/snapshot
+++ b/bin/snapshot
@@ -168,6 +168,7 @@ H5VERSION=hdf5
BASEDIR=${HOME}/snapshots-${H5VERSION}
CURRENT=${BASEDIR}/current
PREVIOUS=${BASEDIR}/previous
+HOSTNAME=`hostname | cut -f1 -d.` # no domain part
# Try finding a version of diff that supports the -I option too.
DIFF=diff
@@ -201,10 +202,10 @@ if [ "$cmd" = "all" -o -n "$cmdtest" ]; then
#create TESTDIR if not exist yet
case "$SRCDIRNAME" in
"")
- SRCDIRNAME=`hostname`
+ SRCDIRNAME=$HOSTNAME
;;
-*)
- SRCDIRNAME="`hostname`$SRCDIRNAME"
+ SRCDIRNAME="$HOSTNAME$SRCDIRNAME"
;;
esac
TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
@@ -287,10 +288,10 @@ if [ -n "$cmdclean" ]; then
else
case "$SRCDIRNAME" in
"")
- SRCDIRNAME=`hostname`
+ SRCDIRNAME=$HOSTNAME
;;
-*)
- SRCDIRNAME="`hostname`$SRCDIRNAME"
+ SRCDIRNAME="$HOSTNAME$SRCDIRNAME"
;;
esac
TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}