diff --git a/Makefile b/Makefile index b5ff4f1..d39b3e5 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ COMPOSE_SAMPLE = $(shell [ "${TARGET}" = "default" ] && echo default || echo dev COMPOSE_FILE = $(shell [ -f \${PROJECT_COMPOSE} ] && echo \${PROJECT_COMPOSE} || echo \${COMPOSE_SAMPLE}) FEEDBACK = $(shell echo 👉 \${TARGET} @\${NAMESPACE_FILE} V\${VERSION} [PHP \${PHP}] \(\${DOCKER_USER}\)) FEEDBACK_SHORT = $(shell echo 👉 \${TARGET} V\${VERSION} [PHP \${PHP}] \(\${DOCKER_USER}\)) -LICENSE ?= $(shell stty -echo; read -p "Chevereto V4 License key: 🔑" license; stty echo; echo $$license) +LICENSE ?= $(shell stty -echo; read -p "Chevereto V4 License key (if any): 🔑" license; stty echo; echo $$license) DOCKER_COMPOSE = $(shell echo @CONTAINER_BASENAME=\${CONTAINER_BASENAME} \ SOURCE=\${SOURCE} \ DB_PORT=\${DB_PORT} \ diff --git a/scripts/system/chevereto.sh b/scripts/system/chevereto.sh index ef5357b..9829550 100755 --- a/scripts/system/chevereto.sh +++ b/scripts/system/chevereto.sh @@ -13,12 +13,15 @@ cd $DOWNLOAD_DIR curl -f -SOJL \ -H "License: $LICENSE" \ "${API_DOWNLOAD}${PACKAGE}" -ZIP_NAME=$(basename chevereto*.zip) -echo "* Extracting package" -unzip -oq chevereto*.zip -d $WORKING_DIR +ZIP_NAME=$(basename *.zip) +echo "* Extracting ${ZIP_NAME} package" +unzip -oq ${ZIP_NAME} -d $WORKING_DIR rm -rf *.zip $DOWNLOAD_DIR cd - ls -lh $WORKING_DIR +if [[ ! $ZIP_NAME == chevereto_* ]]; then + ZIP_NAME=chevereto_${ZIP_NAME/.zip/_abcd.zip} +fi VERSION_PATCH=$(echo "${ZIP_NAME}" | grep -oE "chevereto_([0-9\.]+)" | awk '{ print $1 }') VERSION_PATCH=${VERSION_PATCH#"chevereto_"} VERSION="$VERSION_PATCH"