Skip to content

Commit

Permalink
fix: removed +x in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
hvmzx committed Aug 10, 2024
1 parent aaa7322 commit f5341ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ RUN chmod +rwx 'kindlegen'
RUN rm kindlegen.tar.gz

RUN \
if [ -z ${MOD_VERSION+x} ]; then \
MOD_VERSION=$(curl -s "https://api.github.com/repos/ciromattia/kcc/releases/latest" \
| jq -rc ".tag_name"); \
if [ -z ${MOD_VERSION } ]; then \
echo "MOD_VERSION is not set. Fetching from GitHub..."; \
MOD_VERSION=$(curl -s "https://api.github.com/repos/ciromattia/kcc/releases/latest" | jq -rc ".tag_name"); \
else \
echo "MOD_VERSION is already set to '${MOD_VERSION}'"; \
fi && \
echo "Using MOD_VERSION=${MOD_VERSION}" && \
curl -L https://github.com/ciromattia/kcc/archive/refs/tags/${MOD_VERSION}.tar.gz > kcc.tar.gz && \
tar -xzf kcc.tar.gz && \
mv kcc-$(echo "${MOD_VERSION}" | sed 's/^.\(.*\)/\1/') kcc && \
Expand Down

0 comments on commit f5341ad

Please sign in to comment.