summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-07-16 17:26:21 -0400
committerEndi S. Dewata <edewata@redhat.com>2013-07-22 09:47:52 -0400
commit4d49d7e1845c372164b7bcc2fe759867cfcab0f2 (patch)
tree7b8289ebbc55321d9a852ef68abe191018ece9dc /scripts
parent7e1a8b7f65170b154e917b6a65d20befc6bf7832 (diff)
downloadpki-4d49d7e1845c372164b7bcc2fe759867cfcab0f2.tar.gz
pki-4d49d7e1845c372164b7bcc2fe759867cfcab0f2.tar.xz
pki-4d49d7e1845c372164b7bcc2fe759867cfcab0f2.zip
Added option to override compose work directory.
Currently the compose scripts always use a fixed work directory called "packages" to do the build. To provide more flexibility, a new optional parameter has been added to allow overriding the work directory.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/compose_dogtag_pki_meta_packages7
-rwxr-xr-xscripts/compose_dogtag_pki_theme_packages7
-rw-r--r--scripts/compose_functions3
-rwxr-xr-xscripts/compose_ipa_pki_theme_packages7
-rwxr-xr-xscripts/compose_pki_console_packages7
-rwxr-xr-xscripts/compose_pki_core_packages7
-rwxr-xr-xscripts/compose_pki_migrate_packages7
-rwxr-xr-xscripts/compose_pki_ra_packages7
-rwxr-xr-xscripts/compose_pki_tps_packages7
9 files changed, 50 insertions, 9 deletions
diff --git a/scripts/compose_dogtag_pki_meta_packages b/scripts/compose_dogtag_pki_meta_packages
index a31532192..a2dd5752f 100755
--- a/scripts/compose_dogtag_pki_meta_packages
+++ b/scripts/compose_dogtag_pki_meta_packages
@@ -9,6 +9,7 @@
##
COMPOSE_PWD=`dirname $0`
+source ${COMPOSE_PWD}/compose_functions
## Always switch into the base directory three levels
@@ -28,7 +29,11 @@ PKI_PWD=`pwd`
## Establish packages directory for 'dogtag-pki' META packages
##
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+ PKI_PACKAGES="$WORK_DIR"
+else
+ PKI_PACKAGES="${PKI_PWD}/packages"
+fi
##
diff --git a/scripts/compose_dogtag_pki_theme_packages b/scripts/compose_dogtag_pki_theme_packages
index d2e74d17c..f340dbf9c 100755
--- a/scripts/compose_dogtag_pki_theme_packages
+++ b/scripts/compose_dogtag_pki_theme_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="test common-ui ra-ui tps-ui console-ui"
## Establish the TARGET files/directories of the 'dogtag-pki' source/spec files
##
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+ PKI_PACKAGES="$WORK_DIR"
+else
+ PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
DOGTAG_PKI_THEME_BUILD_DIR="${PKI_PACKAGES}/BUILD"
DOGTAG_PKI_THEME_RPMS_DIR="${PKI_PACKAGES}/RPMS"
DOGTAG_PKI_THEME_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_functions b/scripts/compose_functions
index a6a8ed5b6..7fbb941d6 100644
--- a/scripts/compose_functions
+++ b/scripts/compose_functions
@@ -241,7 +241,7 @@ Fetch_Source_Tarball()
## Check for command line argument validity
##
-GETOPT=`getopt -o '' -l without-javadoc -n "$0" -- "$@"`
+GETOPT=`getopt -o '' -l without-javadoc,work-dir: -n "$0" -- "$@"`
if [ $? != 0 ] ; then
Usage
@@ -253,6 +253,7 @@ eval set -- "$GETOPT"
while true ; do
case "$1" in
--without-javadoc) JAVADOC="--without javadoc" ; shift ;;
+ --work-dir) WORK_DIR="$2" ; shift 2 ;;
--) shift ; break ;;
*) echo "$0: unrecognized option '$1'" 1>&2 ; exit 255 ;;
esac
diff --git a/scripts/compose_ipa_pki_theme_packages b/scripts/compose_ipa_pki_theme_packages
index 02ca483e1..eac6cddd6 100755
--- a/scripts/compose_ipa_pki_theme_packages
+++ b/scripts/compose_ipa_pki_theme_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="common-ui ca-ui"
## Establish the TARGET files/directories of the 'ipa-pki' source/spec files
##
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+ PKI_PACKAGES="$WORK_DIR"
+else
+ PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
IPA_PKI_THEME_BUILD_DIR="${PKI_PACKAGES}/BUILD"
IPA_PKI_THEME_RPMS_DIR="${PKI_PACKAGES}/RPMS"
IPA_PKI_THEME_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_console_packages b/scripts/compose_pki_console_packages
index 1e9939b72..22f17d07d 100755
--- a/scripts/compose_pki_console_packages
+++ b/scripts/compose_pki_console_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="test console"
## Establish the TARGET files/directories of the 'pki-console' source/spec files
##
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+ PKI_PACKAGES="$WORK_DIR"
+else
+ PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
PKI_CONSOLE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
PKI_CONSOLE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
PKI_CONSOLE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_core_packages b/scripts/compose_pki_core_packages
index 78702b551..99d480c31 100755
--- a/scripts/compose_pki_core_packages
+++ b/scripts/compose_pki_core_packages
@@ -49,7 +49,12 @@ fi
## Establish the TARGET files/directories of the 'pki-core' source/spec files
##
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+ PKI_PACKAGES="$WORK_DIR"
+else
+ PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
PKI_CORE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
PKI_CORE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
PKI_CORE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_migrate_packages b/scripts/compose_pki_migrate_packages
index cf59f0174..f9bcaccb8 100755
--- a/scripts/compose_pki_migrate_packages
+++ b/scripts/compose_pki_migrate_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="test migrate"
## Establish the TARGET files/directories of the 'pki-migrate' source/spec files
##
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+ PKI_PACKAGES="$WORK_DIR"
+else
+ PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
PKI_MIGRATE_BUILD_DIR="${PKI_PACKAGES}/BUILD"
PKI_MIGRATE_RPMS_DIR="${PKI_PACKAGES}/RPMS"
PKI_MIGRATE_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_ra_packages b/scripts/compose_pki_ra_packages
index 3eae6f682..0e93ee4e1 100755
--- a/scripts/compose_pki_ra_packages
+++ b/scripts/compose_pki_ra_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="ra"
## Establish the TARGET files/directories of the 'pki-ra' source/spec files
##
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+ PKI_PACKAGES="$WORK_DIR"
+else
+ PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
PKI_RA_BUILD_DIR="${PKI_PACKAGES}/BUILD"
PKI_RA_RPMS_DIR="${PKI_PACKAGES}/RPMS"
PKI_RA_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"
diff --git a/scripts/compose_pki_tps_packages b/scripts/compose_pki_tps_packages
index eb0706ceb..a23c52982 100755
--- a/scripts/compose_pki_tps_packages
+++ b/scripts/compose_pki_tps_packages
@@ -46,7 +46,12 @@ PKI_COMPONENT_LIST="tps"
## Establish the TARGET files/directories of the 'pki-tps' source/spec files
##
-PKI_PACKAGES="${PKI_PWD}/packages"
+if [ $WORK_DIR ]; then
+ PKI_PACKAGES="$WORK_DIR"
+else
+ PKI_PACKAGES="${PKI_PWD}/packages"
+fi
+
PKI_TPS_BUILD_DIR="${PKI_PACKAGES}/BUILD"
PKI_TPS_RPMS_DIR="${PKI_PACKAGES}/RPMS"
PKI_TPS_SOURCES_DIR="${PKI_PACKAGES}/SOURCES"