[comp.sources.amiga] v90i035: which.rexx 1.2 - shell for C:Which that knows of WShell's global path, Part01/01

Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator) (02/01/90)

Submitted-by: Juergen Hermann <jh%ccave.uucp@RELAY.CS.NET>
Posting-number: Volume 90, Issue 035
Archive-name: util/which.rx-1.2

#!/bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 1)."
# Contents:  which.rexx
# Wrapped by tadguy@xanth on Wed Jan 31 21:34:42 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'which.rexx' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'which.rexx'\"
else
echo shar: Extracting \"'which.rexx'\" \(685 characters\)
sed "s/^X//" >'which.rexx' <<'END_OF_FILE'
X/*  which.rexx
X
X    A shell for C:Which that knows of WShell's global path
X
X    $Author: jh $
X    $Date: 90/01/30 23:13:34 $
X    $Revision: 1.2 $
X    $State: Exp $
X
X    $Log:	which.rexx,v $
X	Revision 1.2  90/01/30	23:13:34  jh
X	Check for the existance of a global path in ENV:Path
X
X	Revision 1.1  90/01/30	21:07:48  jh
X	Initial revision
X
X*/
X
XFailAt 30
X
XParse Arg args
X
Xif ~ Exists('ENV:Path') then do
X    "C:Which" args
X    exit
X    end
X
X"Path Show | ExecIO From 2 Stem oldpath."
Xlocalpath = ''
Xdo i = 1 to oldpath.0 - 1
X    localpath = localpath' 'oldpath.i
X    end
X
X"ExecIO Read ENV:Path For 1 Var globalpath"
X
X"Path Add" globalpath
X"C:Which" args
X
X"Path Reset"
X"Path Add" localpath
END_OF_FILE
if test 685 -ne `wc -c <'which.rexx'`; then
    echo shar: \"'which.rexx'\" unpacked with wrong size!
fi
# end of 'which.rexx'
fi
echo shar: End of archive 1 \(of 1\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have the archive.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
-- 
Submissions to comp.sources.amiga and comp.binaries.amiga should be sent to:
	amiga@cs.odu.edu	
or	amiga@xanth.cs.odu.edu	( obsolescent mailers may need this address )
or	...!uunet!xanth!amiga	( very obsolescent mailers need this address )

Comments, questions, and suggestions s should be addressed to ``amiga-request''
(only use ``amiga'' for submissions) at the above addresses.