From 166782b4e3ce807ea289a4ae99e9a05163f894bb Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Thu, 20 Feb 2020 11:57:31 -0500 Subject: [PATCH] add fallback for getting LOCAL_NET_ID --- bin/prep_bubble_jar | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/prep_bubble_jar b/bin/prep_bubble_jar index 53e50374..a77b43b6 100755 --- a/bin/prep_bubble_jar +++ b/bin/prep_bubble_jar @@ -59,7 +59,11 @@ fi LOCAL_NET_ID="$("${SCRIPT_DIR}/bconst" bubble.ApiConstants.ROOT_NETWORK_UUID 2> /dev/null)" if [[ -z "${LOCAL_NET_ID}" ]] ; then - die "ROOT_NETWORK_UUID could not be read from ApiConstants" + # try to read from source file + LOCAL_NET_ID="$(cat "${BUBBLE_SERVER}/src/main/java/bubble/ApiConstants.java" | grep -v '//' | egrep '\s+String\s+ROOT_NETWORK_UUID' | awk -F '"' '{print $2}')" + if [[ -z "${LOCAL_NET_ID}" ]] ; then + die "ROOT_NETWORK_UUID could not be read from ApiConstants" + fi fi echo "lbs = ${LOCALSTORAGE_BASE_DIR}"