From 9801a03bce45b93dbc284f19a4b33a04a73087ad Mon Sep 17 00:00:00 2001 From: Arjan H Date: Sun, 11 Nov 2018 13:32:52 +0100 Subject: [PATCH 1/2] Remove first-time dependency on utils.sh --- install | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/install b/install index 990ccc8..1824858 100755 --- a/install +++ b/install @@ -38,6 +38,17 @@ INFO="[i]" DONE="${COL_LIGHT_GREEN} done!${COL_NC}" OVER="\\r\\033[K" +# Dummy implementation in case utils.sh is not available (install via curl method) +wait_down() { + sleep 1 +} +wait_up() { + sleep 5 +} + +dn=$(dirname $0) +source "$dn/utils.sh" &>/dev/null || true + # # Helper functions for informing the user and logging to file # @@ -567,9 +578,6 @@ startup() { fi msg_info "$msg (this will take a while!!)" - dn=$(dirname $0) - source "$dn/utils.sh" - docker-compose stop &>>$installLog || true wait_down $PS_MYSQL &>>$installLog wait_down $PS_BHSM &>>$installLog From 3b023fe9336a53f488e0bef78fab3bc813aa6233 Mon Sep 17 00:00:00 2001 From: Arjan H Date: Sun, 11 Nov 2018 13:43:33 +0100 Subject: [PATCH 2/2] Fix version display --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 1824858..72adefe 100755 --- a/install +++ b/install @@ -285,7 +285,7 @@ copy_admin() { replace_all /home/labca/acme_tiny.py LABCA_FQDN cd "$cloneDir" - version=$(git describe --always HEAD^2 2>/dev/null || git describe --always HEAD 2>/dev/null) + version=$(git describe --always HEAD 2>/dev/null) cd "$adminDir" grep \"version\" data/config.json &>/dev/null || sed -i -e 's/^}$/,\n "version": ""\n}/' data/config.json sed -i -e "s/\"version\": \".*\"/\"version\": \"$version\"/" data/config.json