############################## 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
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
VOMS='yes'
shift
;;
+ -o|--onlyenv)
+ ONLYENV='yes'
+ CATYPES=''
+ ALL='no'
+ shift
+ ;;
-h|--help)
echo $USAGE
exit
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
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
+