#!/bin/sh if [ $# = 0 ] then echo "usage: tndas.access directory" 1>&2 exit 1 fi MACH=`uname -s` Sysx="`echo $MACH | cut -b -6`" if [ $Sysx = "CYGWIN" ]; then MACH=`uname -o` elif [ $Sysx = "Darwin" ]; then MACH=`uname -sm | sed 's/[ ]/_/'` elif [ $Sysx = "SunOS" ]; then MACH=`uname -sm | sed 's/[ ]/_/'` fi if [ "$MACH" = "Linux" -o "$MACH" = "OSF1" -o "$MACH" = "Cygwin" -o "$MACH" = "SunOS_i86pc" \ -o "$MACH" = "Darwin_i386" -o "$MACH" = "Darwin_x86_64" -o "$MACH" = "Darwin_arm64" ] then echo 'use little endian libraries' pos=$1/../../libraries/l_endian else echo 'use big endian libraries' pos=$1/../../libraries/b_endian fi #---- # Recover the ascii table of content #---- if [ -f "$pos"/E65LIB6.idx.gz ] then echo 'gunzipping E65LIB6.idx' chmod 755 "$pos" gunzip "$pos"/E65LIB6.idx.gz fi #---- # Recover the binary library #---- if [ -f "$pos"/E65LIB6.sdb.gz ] then echo 'gunzipping E65LIB6.sdb' chmod 755 "$pos" gunzip "$pos"/E65LIB6.sdb.gz fi if [ -f "$pos"/E65LIB6.sdb ] then ln -s "$pos"/E65LIB6.idx E65LIB6.idx ln -s "$pos"/E65LIB6.sdb E65LIB6.sdb fi #---- # Recover the Dysprosium patch #---- if [ -f "$pos"/Dy_RT0.sdb.gz ] then echo 'gunzipping Dy_RT0.sdb' chmod 755 "$pos" gunzip "$pos"/Dy_RT0.sdb.gz fi if [ -f "$pos"/Dy_RT0.sdb ] then ln -s "$pos"/Dy_RT0.sdb Dy_RT0.sdb fi ls echo "tndas.access access script terminated"