#!/bin/ksh # # $Id: nsrrcopy.sh,v 1.1.12.2 2006/06/29 14:21:07 mmanasaw Exp $ Copyright (c) 2005, LEGATO Software, a division of EMC. # # # Copyright (c) 2005 LEGATO Software, a division of EMC. # # All rights reserved. This is an UNPUBLISHED work, and # comprises proprietary and confidential information of LEGATO. # Unauthorized use, disclosure, and distribution are strictly # prohibited. Use, duplication, or disclosure of the software # and documentation by the U.S. Government is subject to # restrictions set forth in a license agreement between the # Government and LEGATO or other written agreement specifying # the Government's rights to use the software and any applicable # FAR provisions, such as FAR 52.227-19. # PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/etc:/usr/opt/networker/bin:/opt/networker/bin; export PATH # get the path of this script, so we can run uasm from there set_path=`dirname $0` # If the savestream passed to this script on the standard input stream was # created relative to a directory i.e. (uasm -s -u -v .), the user may want # to recover the savestream relative to a different base directory. This # is done via the -t option. # # If the savestream passed to this script on the standard input stream was # created with an absolute path i.e. (uasm -s -u -v c:\tmp), then the -t # option will have no impact. # if [ "$1" = "-t" ] then if [ ! -d "$2" ] || [ ! -w "$2" ] then mkdir $2 fi cd $2 shift shift else cd $set_path fi # Check if the path mapping option (-m) was specified by the caller. If so, # the uasm command is adjusted to perform the substitution specified by the # following two arguments. # if [ "$1" = "-m" ] then $set_path/uasm -r -u -iY -m $2=$3 $4 1>&2 2>/dev/null else $set_path/uasm -r -u -iY $1 1>&2 2>/dev/null fi exit $?