From ae851841c95008e8a5deef8b791e325f079511be Mon Sep 17 00:00:00 2001 From: Joni Hahkala Date: Thu, 13 Jan 2005 20:04:24 +0000 Subject: [PATCH] not workin, trying to make it work for the build system. --- bin/generate-test-certificates.sh | 56 ++++++++++++++++++--------------------- build.xml | 12 ++++++--- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/bin/generate-test-certificates.sh b/bin/generate-test-certificates.sh index e7bb6fa..e64c3d3 100755 --- a/bin/generate-test-certificates.sh +++ b/bin/generate-test-certificates.sh @@ -10,31 +10,9 @@ # Authors: # Joni Hahkala # Akos Frohner +# John White # -if [ "$1" == "--all" ]; then - # CATYPES='trusted' - # CATYPES='fake' - # CATYPES='big' - # CATYPES='expired' - CATYPES='trusted fake big expired' - ALL='yes' - shift -else - CATYPES='trusted' -fi - -BASEDIR=$1 - -CONFIGDIR=$PWD/$(dirname $0)/../test -export PASSWORD='changeit' -DAYS=10000 - -##PROJDIR=$PWD/$(dirname $0)/../project -##VERSION='v' -##VERSION=${VERSION}$(awk -F'[ =]' '/module.version/ { print $2} ' project/version.properties) -##VERSION=${VERSION}'-' -##VERSION=${VERSION}$(awk -F'[ =]' '/module.age/ { print $2} ' project/version.properties) # generating the PKCS#12 format function create_p12 { @@ -478,23 +456,41 @@ function create_all_test { ############################## main ################################ -if [ -z "$BASEDIR" ]; then +if [ "$1" == "--all" ]; then + CATYPES='trusted fake big expired' + ALL='yes' + shift +else + CATYPES='trusted' +fi + +#define all used dirs +TARGETDIR=$1 +MODULEDIR=$(dirname $0)/.. +CONFIGDIR=$MODULEDIR/test + +export PASSWORD='changeit' +DAYS=10000 + +if [ -z "$TARGETDIR" ]; then echo "Please specify the destination directory!" exit -1 fi -BASEDIR="$BASEDIR/share/test/certificates" -mkdir -p $BASEDIR -cd $BASEDIR +mkdir -p $TARGETDIR + +cd $TARGETDIR echo "Current directory now: `pwd`" +echo "Config directory now: ${CONFIGDIR}" + mkdir -p tmp -ABSBASEDIR=$(pwd) +ABSTARGETDIR=$(pwd) for catype in $CATYPES; do echo "+-----------------------" echo "| $catype" echo "+-----------------------" - cd $ABSBASEDIR + cd $ABSTARGETDIR export CATYPE=${catype} export CA_DIR=${catype}-ca @@ -519,7 +515,7 @@ for catype in $CATYPES; do continue fi if [ -d "$CA_DIR" ]; then - echoclean "CA directory already exists: $CA_DIR" + echo "CA directory already exists: $CA_DIR" else cp -a $CONFIGDIR/${catype}-ca $CA_DIR fi diff --git a/build.xml b/build.xml index 568890a..08473b8 100644 --- a/build.xml +++ b/build.xml @@ -85,15 +85,21 @@ ============================================== --> - + + + + + - - + path: ${stage.dir}/share/test/certificates + path: "${module.dir}/bin" + + -- 1.8.2.3