diff --git a/aemw b/aemw index 0642a56b..8db2bee2 100755 --- a/aemw +++ b/aemw @@ -1,12 +1,10 @@ #!/usr/bin/env sh -. aem/api.sh - -# Download tool - VERSION=${AEMC_VERSION:-"0.5.7"} COMMAND_DEFAULT=${AEMC_COMMAND_DEFAULT:-"setup"} +. aem/api.sh + OS=$(detectOs) ARCH=$(detectArch) DOWNLOAD_URL="https://github.com/wttech/aemc/releases/download/v${VERSION}/${BIN_NAME}_${OS}_${ARCH}.tar.gz" @@ -16,6 +14,8 @@ BIN_ARCHIVE_FILE="$BIN_ROOT/$BIN_NAME.tar.gz" BIN_ARCHIVE_DIR="$BIN_ROOT/$BIN_NAME" BIN_EXEC_FILE="$BIN_ARCHIVE_DIR/$BIN_NAME" +# Download or build tool + if [ "$VERSION" = "dev" ]; then make build BIN_EXEC_FILE="bin/aem" diff --git a/init.sh b/init.sh index 5deb8167..ac237381 100644 --- a/init.sh +++ b/init.sh @@ -1,6 +1,7 @@ #!/usr/bin/env sh -SOURCE_URL=https://raw.githubusercontent.com/wttech/aemc/main +VERSION=${AEMC_VERSION:-"0.5.7"} +SOURCE_URL=https://raw.githubusercontent.com/wttech/aemc/v${VERSION} AEM_WRAPPER=aemw AEM_DIR=aem