File: checkEnvironment

package info (click to toggle)
ctn 3.2.0~dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,336 kB
  • ctags: 21,262
  • sloc: ansic: 179,501; makefile: 7,004; java: 1,863; csh: 1,067; yacc: 523; sh: 424; cpp: 394; sql: 389; lex: 170
file content (23 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/csh

# This script is used to check an environment variable.  It
# takes two arguments:
#  variable name
#  value
#
# If the second argument is "", then we assume the caller did
# not set the variable properly and we exit with a status of 1
#
# For example:  checkEnvironment DICOM_LIBSRC $DICOM_LIBSRC

if ($1 == "") then
  echo "Usage: <variable name> <variable value>
  exit 2
endif

if ($2 == "") then
  echo No value set for $1
  exit 1
endif

exit 0