File: command-names

package info (click to toggle)
cssc 1.0.1-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 3,620 kB
  • ctags: 1,424
  • sloc: cpp: 13,500; sh: 4,759; ansic: 2,971; perl: 342; makefile: 342; awk: 11
file content (77 lines) | stat: -rw-r--r-- 1,459 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

dir=${dir:-../..}

# Get the canonical directory name
case "$dir" in 
	/*)   
		;; 
	*)	
		dir=`cd "$dir" && pwd || echo "$dir"`
		;;
esac
# echo "Directory under test is $dir"

get=${get:-${dir}/get}
admin=${admin:-${dir}/admin}
cdc=${cdc:-${dir}/cdc}
prs=${prs:-${dir}/prs}
prt=${prt:-${dir}/prt}
delta=${delta:-${dir}/delta}
sact=${sact:-${dir}/sact}
sccsdiff=${sccsdiff:-${dir}/sccsdiff}
unget=${unget:-${dir}/unget}
what=${what:-${dir}/what}
val=${val:-${dir}/val}
rmdel=${rmdel:-${dir}/rmdel}


DIFF=${DIFF:-diff}

for f in ${get} ${admin} ${csc} ${prs} ${prt} \
	${delta} ${sact} ${sccsdiff} ${unget} ${what} ${rmdel}
do
	case $f in 
		/*)
			test -x "$f" || echo "WARNING: cannot execute $f" >&2
			;;
		*)
			;;
	esac
done

# Find the sccs driver program.   Note that we use ${sccs} here;
# ${sccs} was set, above.

# We need to run the candidate 
# to find out if it accepts the --prefix option.

if test x"${sccs}" = x
then
    if test -f "${dir}/sccs"
    then
	sccsprog="${dir}/sccs"
    elif test -f "${dir}/bsd/sccs"
    then
	sccsprog="${dir}/bsd/sccs"
    else
	case "${dir}" in 
	    /*)    sccsprog="${dir}/bsd/sccs"
		    ;;
	    ../..) sccsprog="${dir}/bsd/sccs"
		    ;;
	    *) sccsprog="sccs"
		    ;;
	esac
    fi

    # Find out if it takes the --prefix option.  If so,
    # use it.
    if ${sccsprog} --cssc >/dev/null 2>&1
    then
	sccsargs="--prefix=${dir}/"
    else
	sccsargs=""
    fi

    sccs="${sccsprog} ${sccsargs}"
fi