URL
https://opencores.org/ocsvn/s1_core/s1_core/trunk
Subversion Repositories s1_core
[/] [s1_core/] [trunk/] [tools/] [bin/] [test_var] - Rev 113
Go to most recent revision | Compare with Previous | Blame | View Log
#!/bin/bash# This script is not supposed to be run stand-alone, it is usually included by other scripts# to check that an environment variable is set and that the corresponding directory does exist.if (test $# != 1) thenecho "Usage: $0 VAR_NAME"exit 1;fivar_name=$1eval dir_name=\$$var_nameif [ -z "$dir_name" ]; thenecho "***ERROR***: Environment variable $var_name is undefined, please set it in the sourceme file and source it."exit 1fiif [ ! -d "$dir_name" ]; thenecho "***ERROR***: Directory $dir_name does not exist, please check it and run 'source sourceme' again."exit 1fi
Go to most recent revision | Compare with Previous | Blame | View Log
