Skip to content

Commit

Permalink
Fixed shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre-Lematre committed Sep 4, 2024
1 parent 0a7ab07 commit d17f5ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/hydrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ sudo php -f "${PS_FOLDER}/install/index_cli.php" -- \
--newsletter=0 \
--send_email=0 \
--ssl=0 \
$([ "$INSTALL_MODULES" == "true" ] && echo "--modules=$(ls $PS_FOLDER/modules | grep -v index.php | paste -s -d ',')" || echo "" )
"$([ "$INSTALL_MODULES" == "true" ] && echo "--modules=$(find "$PS_FOLDER"/modules/* -maxdepth 0 -type d -exec basename {} \; | paste -s -d ',')" || echo "" )"
echo "✅ PrestaShop installed"

# 7. Swap off dev mode
Expand Down
12 changes: 6 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ build_default_labels() {
}

build_labels() {
if [ ! -z "$CUSTOM_LABELS" ]; then
if [ -n "$CUSTOM_LABELS" ]; then

IFS="," read -ra labels <<< "$(echo $CUSTOM_LABELS | sed -E 's/^[\x27\x22]|[\x27\x22]$//g')" # We don't need starting or ending quotes
IFS="," read -ra labels <<< "$(echo "$CUSTOM_LABELS" | sed -E 's/^[\x27\x22]|[\x27\x22]$//g')" # We don't need starting or ending quotes
for label in "${labels[@]}"; do
IFS="=" read -ra parts <<< "$label"
IMAGE_LABELS["${parts[0]}"]="${parts[1]}"
Expand Down Expand Up @@ -193,7 +193,7 @@ if [ -n "${DRY_RUN}" ]; then
fi

labelString=
for key in ${!IMAGE_LABELS[@]}
for key in "${!IMAGE_LABELS[@]}"
do
labelString=$labelString' --label '$key'="'${IMAGE_LABELS[$key]}'"'
done
Expand All @@ -212,7 +212,7 @@ eval docker buildx build \
--build-arg NODE_VERSION="$NODE_VERSION" \
--build-arg ZIP_SOURCE="$ZIP_SOURCE" \
--build-arg INSTALL_MODULES="$INSTALL_MODULES" \
$labelString \
"${TARGET_IMAGES[@]}" \
$([ "${PUSH}" == "true" ] && echo "--push" || echo "--load") \
"$labelString" \
"${TARGET_IMAGES[*]}" \
"$([ "${PUSH}" == "true" ] && echo "--push" || echo "--load")" \
.

0 comments on commit d17f5ee

Please sign in to comment.