Skip to content

Commit

Permalink
Use single brackets on commands
Browse files Browse the repository at this point in the history
This is because in Ubuntu, sh breaks when trying to interpret `[[`

Signed-off-by: Mauro Morales <[email protected]>
  • Loading branch information
mauromorales committed Aug 23, 2023
1 parent 4c73237 commit 7133a7a
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -676,16 +676,6 @@ arm-image:
WORKDIR /build
# These sizes are in MB
ENV SIZE="15200"
IF [[ "$FLAVOR" =~ ^ubuntu* ]]
ENV STATE_SIZE="6900"
ENV RECOVERY_SIZE="4600"
ENV DEFAULT_ACTIVE_SIZE="2500"
ELSE
ENV STATE_SIZE="6200"
ENV RECOVERY_SIZE="4200"
ENV DEFAULT_ACTIVE_SIZE="2000"
END

IF [[ "$FLAVOR" = "ubuntu-20-lts-arm-nvidia-jetson-agx-orin" ]]
ENV STATE_SIZE="14000"
ENV RECOVERY_SIZE="10000"
Expand Down Expand Up @@ -1171,7 +1161,7 @@ PROVIDER_INSTALL:

COPY +luet/luet /usr/bin/luet

IF [[ "$PROVIDER_KAIROS_BRANCH" = "" ]] # Install with luet (released versions of the binary)
IF [ "$PROVIDER_KAIROS_BRANCH" = "" ] # Install with luet (released versions of the binary)
# We don't specify a version. To bump, just change what the latest version
# in the repository is.
RUN luet install -y system/provider-kairos
Expand All @@ -1185,11 +1175,11 @@ PROVIDER_INSTALL:
INSTALL_K3S:
COMMAND

IF [[ "$K3S_VERSION" = "" ]]
IF [ "$K3S_VERSION" = "" ]
RUN echo "$K3S_VERSION must be set" && exit 1
END

IF [[ "$K3S_VERSION" = "latest" ]] # Install latest using the upstream installer
IF [ "$K3S_VERSION" = "latest" ] # Install latest using the upstream installer
ENV INSTALL_K3S_BIN_DIR="/usr/bin"
RUN curl -sfL https://get.k3s.io > installer.sh \
&& INSTALL_K3S_SELINUX_WARN=true INSTALL_K3S_SKIP_START="true" INSTALL_K3S_SKIP_ENABLE="true" INSTALL_K3S_SKIP_SELINUX_RPM="true" bash installer.sh \
Expand Down

0 comments on commit 7133a7a

Please sign in to comment.