changeset 47303:c87f7ff9ef65

8188136: jib configure requires --src-dir for out of tree builds 8188123: jib.sh looks for closed config file in the wrong place after repo consolidation Reviewed-by: dholmes, tbell
author erikj
date Fri, 29 Sep 2017 15:26:13 +0200
parents 2853531b2c8c
children 798610a8a552
files bin/jib.sh
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/bin/jib.sh	Fri Sep 29 16:37:36 2017 +0530
+++ b/bin/jib.sh	Fri Sep 29 15:26:13 2017 +0200
@@ -28,8 +28,8 @@
 mydir="$(dirname "${BASH_SOURCE[0]}")"
 myname="$(basename "${BASH_SOURCE[0]}")"
 
-installed_jib_script=${mydir}/../../.jib/jib
-install_data=${mydir}/../../.jib/.data
+installed_jib_script=${mydir}/../.jib/jib
+install_data=${mydir}/../.jib/.data
 
 setup_url() {
     if [ -f ~/.config/jib/jib.conf ]; then
@@ -42,7 +42,7 @@
     jib_revision="2.0-SNAPSHOT"
     jib_ext="jib.sh.gz"
 
-    closed_script="${mydir}/../../../closed/conf/jib-install.conf"
+    closed_script="${mydir}/../../closed/make/conf/jib-install.conf"
     if [ -f "${closed_script}" ]; then
         source "${closed_script}"
     fi
@@ -146,4 +146,9 @@
     install_jib
 fi
 
+# Provide a reasonable default for the --src-dir parameter if run out of tree
+if [ -z "${JIB_SRC_DIR}" ]; then
+    export JIB_SRC_DIR="${mydir}/../"
+fi
+
 ${installed_jib_script} "$@"