File:  [MW Coherent from dump] / coherent / b / STREAMS / conf / bin / src / shell_utils
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:36 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

# Some handy shell-script utilities for the shell scripts that drive the
# 'devadm' command.

# Call with the $0 of the script as a parameter; this commands writes the
# name of the directory containing the script to standard output.
# Example:
#	conf_path $0

conf_path () {
	set `which $1 2>/dev/null` X
	if [ $# -ne 2 ]; then
		echo .		# Assume the current directory.
		return 1
	fi
	set `expr $1 : '\(.*\)/.*'` X
	if [ $# -ne 2 ]; then
		echo .		# Must be in the current directory.
	else
		echo $1
	fi
	return 0
}


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.