style: fixed indent to 2 to match the rest

This commit is contained in:
hvmzx 2024-08-09 19:51:28 +02:00
parent 41eac29fda
commit 966fd11c20
2 changed files with 62 additions and 8 deletions

View File

@ -9,14 +9,14 @@ RUN chmod +rwx 'kindlegen'
RUN rm kindlegen.tar.gz
RUN latest_tag=$(curl -s https://api.github.com/repos/ciromattia/kcc/releases/latest | jq -rc ".tag_name") && \
curl -L https://github.com/ciromattia/kcc/archive/refs/tags/$latest_tag.tar.gz > kcc.tar.gz && \
tar -xzf kcc.tar.gz && \
mv kcc-$(echo "$latest_tag" | sed 's/^.\(.*\)/\1/') kcc && \
touch kcc/KCC_VERSION && \
echo $latest_tag > kcc/KCC_VERSION && \
mkdir -p /root-layer/usr/local/bin && \
mv kindlegen /root-layer/usr/local/bin/ && \
mv kcc /root-layer/usr/local/bin/
curl -L https://github.com/ciromattia/kcc/archive/refs/tags/$latest_tag.tar.gz > kcc.tar.gz && \
tar -xzf kcc.tar.gz && \
mv kcc-$(echo "$latest_tag" | sed 's/^.\(.*\)/\1/') kcc && \
touch kcc/KCC_VERSION && \
echo $latest_tag > kcc/KCC_VERSION && \
mkdir -p /root-layer/usr/local/bin && \
mv kindlegen /root-layer/usr/local/bin/ && \
mv kcc /root-layer/usr/local/bin/
COPY root/ /root-layer/

View File

@ -0,0 +1,54 @@
#!/usr/bin/with-contenv bash
# This is the init file used for adding os or pip packages to install lists.
# It takes advantage of the built-in init-mods-package-install init script that comes with the baseimages.
# If using this, we need to make sure we set this init as a dependency of init-mods-package-install so this one runs first
echo "**** Adding kcc dependencies (repo and pip) to package install lists ****"
if ! python3 /usr/local/bin/kcc/kcc-c2e.py > /dev/null 2>&1 ; then
echo "\
PySide6 \
Pillow \
psutil \
requests \
python-slugify \
raven \
mozjpeg-lossless-optimization \
natsort[fast] \
distro" >> /mod-pip-packages-to-install.list
## Ubuntu
if [ -f /usr/bin/apt ]; then
echo "\
python3 \
python3-pip
python3-dev \
libpng-dev \
libjpeg-dev \
p7zip-full \
p7zip-rar \
unrar-free \
libgl1 \
python3-pyqt5 \
cmake" >> /mod-repo-packages-to-install.list
fi
# Alpine
if [ -f /sbin/apk ]; then
echo "\
cargo \
libffi-dev \
openssl-dev \
python3 \
python3-dev \
python3 \
py3-pip \
libpng-dev \
libjpeg \
p7zip \
unrar \
mesa-gl \
py3-qt5 \
cmake" >> /mod-repo-packages-to-install.list
fi
else
echo "**** kcc dependencies already installed, skipping ****"
fi