38 lines
877 B
Bash
Executable File
38 lines
877 B
Bash
Executable File
#!/bin/sh
|
|
# Create symbolic links to the hypre distribution tar file
|
|
# executed in /usr/casc/hypre and /usr/gapps/hypre
|
|
# usage: ./mkdistlinks HypreArchiveFile
|
|
#
|
|
# Directory list as of July 2006 based on SYS_TYPE environment variable for
|
|
# LC platforms and i686-pc-linux-gnu for the CASC open cluster
|
|
|
|
DIR="\
|
|
i686-pc-linux-gnu\
|
|
aix_5_ll\
|
|
aix_5_64_fed\
|
|
tru64_5\
|
|
sles_9_ppc64\
|
|
chaos_3_ia64_elan4\
|
|
chaos_3_x86\
|
|
chaos_3_x86_64_ib\
|
|
chaos_3_x86_elan3"
|
|
#
|
|
## Verify that there is an argument given on the command line
|
|
if [ $# -ne 1 ]
|
|
then printf "usage: $0 HypreArchiveFile\n"
|
|
exit 1
|
|
else TAR_FILE=$1
|
|
fi
|
|
#
|
|
## if the tar file exists; create a symbolic link to it in each directory
|
|
if [ -f $TAR_FILE ]
|
|
then for i in $DIR
|
|
do if [ -d $i ]
|
|
then ( cd $i; ln -s ../$TAR_FILE $TAR_FILE)
|
|
ls -l $i/$TAR_FILE
|
|
fi
|
|
done
|
|
else print "can not find $TAR_FILE"
|
|
exit 1
|
|
fi
|