Skip to content

Commit

Permalink
move declarations after install
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Oct 17, 2019
1 parent 0020dbe commit 01f6b05
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions aemdesign-testing/asciidoctor-convert-reports
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ EXTENSION_PDF=".pdf"
EXTENSION_HTML=".html"
FRONT_COVER="src/asciidoc/aem.png"
DOCINFODIR="src/asciidoc"
LOCAL_GEM_USER_PATH=$(ruby -e 'puts Gem.user_dir')
LOCAL_BUNDLE="$(which bundle)"
if [[ -z "$LOCAL_BUNDLE" ]]; then
LOCAL_BUNDLE="$(find $LOCAL_GEM_USER_PATH/gems/*/exe/* -name bundle)"
fi

function toUpperCase() {
local STRING=$@
Expand Down Expand Up @@ -132,7 +127,7 @@ function installDependencies() {
LOCAL_BUNDLER="$(find $LOCAL_GEM_USER_PATH/gems/*/exe/* -name bundler)"
fi

local STATUS_CHECK="$($LOCAL_BUNDLER check --path vendor/bundle)"
local STATUS_CHECK="$($LOCAL_BUNDLER check --path vendor/bundle)"
debug "CHECK RUBY: $STATUS_CHECK"

if [[ ! "$STATUS_CHECK" == *"dependencies are satisfied"* ]]; then
Expand Down Expand Up @@ -226,6 +221,13 @@ function main() {

installDependencies

LOCAL_GEM_USER_PATH=$(ruby -e 'puts Gem.user_dir')
LOCAL_BUNDLE="$(which bundle)"
if [[ -z "$LOCAL_BUNDLE" ]]; then
LOCAL_BUNDLE="$(find $LOCAL_GEM_USER_PATH/gems/*/exe/* -name bundle)"
fi


printConfig

checkArguments
Expand Down

0 comments on commit 01f6b05

Please sign in to comment.