| 1 |
#!/bin/csh |
| 2 |
|
| 3 |
# This script is used to check an environment variable. It |
| 4 |
# takes two arguments: |
| 5 |
# variable name |
| 6 |
# value |
| 7 |
# |
| 8 |
# If the second argument is "", then we assume the caller did |
| 9 |
# not set the variable properly and we exit with a status of 1 |
| 10 |
# |
| 11 |
# For example: checkEnvironment DICOM_LIBSRC $DICOM_LIBSRC |
| 12 |
|
| 13 |
if ($1 == "") then |
| 14 |
echo "Usage: <variable name> <variable value> |
| 15 |
exit 2 |
| 16 |
endif |
| 17 |
|
| 18 |
if ($2 == "") then |
| 19 |
echo No value set for $1 |
| 20 |
exit 1 |
| 21 |
endif |
| 22 |
|
| 23 |
exit 0 |