From: Akos Frohner Date: Thu, 4 May 2006 16:16:48 +0000 (+0000) Subject: env settings for testing. Use --onlyenv to print these variables, nothing else X-Git-Tag: glite-security-test-utils_R_1_6_0~18 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=05016e085ff4087f2cc07bfd6f39c3aeeacb685f;p=glite-security-test-utils.git env settings for testing. Use --onlyenv to print these variables, nothing else --- diff --git a/bin/generate-test-certificates.sh b/bin/generate-test-certificates.sh index 020a16f..bb8e706 100755 --- a/bin/generate-test-certificates.sh +++ b/bin/generate-test-certificates.sh @@ -556,9 +556,9 @@ function create_all { ############################## main ################################ -USAGE="$0 [--help] [--all|--some] [--voms] [--extra #extra-user-certs]" +USAGE="$0 [--help] [--all|--some] [--voms] [--onlyenv] [--extra #extra-user-certs]" -TEMP=$(getopt -o hasve: --long help,all,some,voms,extra: -- "$@") +TEMP=$(getopt -o hasvoe: --long help,all,some,voms,onlyenv,extra: -- "$@") eval set -- "$TEMP" # by default do not create all variations of certificates @@ -569,6 +569,8 @@ CATYPES='trusted' unset EXTRACERTS # by default fake VOMS certificate are not created VOMS='no' +# if we only show environmental settings +ONLYENV='no' while true; do case "$1" in @@ -591,6 +593,12 @@ while true; do VOMS='yes' shift ;; + -o|--onlyenv) + ONLYENV='yes' + CATYPES='' + ALL='no' + shift + ;; -h|--help) echo $USAGE exit @@ -630,11 +638,11 @@ if [ ! -d $X509_CERT_DIR ] then mkdir -p $X509_CERT_DIR fi -echo "Certificate directory set to $X509_CERT_DIR"; +[ "$ONLYENV" = 'yes' ] || echo "Certificate directory set to $X509_CERT_DIR" cd $TARGETDIR -echo "Current directory now: $PWD" -echo "Config directory now: ${CONFIGDIR}" +[ "$ONLYENV" = 'yes' ] || echo "Current directory now: $PWD" +[ "$ONLYENV" = 'yes' ] || echo "Config directory now: ${CONFIGDIR}" tmpdir=$PWD/tmp mkdir -p $tmpdir @@ -724,3 +732,12 @@ for catype in $CATYPES; do fi done + +[ "$ONLYENV" = 'yes' ] || echo "Easy usage environmental variable settings:" +echo "export X509_CERT_DIR=$ABSTARGETDIR/grid-security/certificates" +echo "export X509_USER_CERT=$ABSTARGETDIR/home/usercert.pem" +echo "export X509_USER_KEY=$ABSTARGETDIR/home/userkey.pem" +if [ "$VOMS" = 'yes' ]; then + echo "export VOMSDIR=$ABSTARGETDIR/grid-security/vomsdir" +fi +