Skip to content

Commit 12e58dc

Browse files
puneetsharma21jiridanek
authored andcommitted
Add else condition for unsupported arch in install scripts
Signed-off-by: puneetsharma21 <[email protected]>
1 parent 5a73b18 commit 12e58dc

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

jupyter/utils/install_pandoc.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,28 @@ if [[ "$ARCH" == "ppc64le" ]]; then
1919

2020
cabal update
2121
cd pandoc-cli
22-
cabal build -j$(nproc)
23-
cabal install --installdir=/usr/local --overwrite-policy=always --install-method=copy
22+
cabal build -j"$(nproc)"
23+
mkdir -p /usr/local/pandoc/bin
24+
cabal install \
25+
--installdir=/usr/local/pandoc/bin \
26+
--overwrite-policy=always \
27+
--install-method=copy
2428

2529
# Clean up Haskell build system
2630
rm -rf ~/.cabal ~/.ghc /tmp/pandoc
2731
dnf remove -y cabal-install ghc gmp-devel
2832
dnf clean all && rm -rf /var/cache/dnf
29-
fi
3033

31-
if [[ "$ARCH" == "x86_64" ]]; then
34+
/usr/local/pandoc/bin/pandoc --version
35+
36+
elif [[ "$ARCH" == "x86_64" ]]; then
3237
# pandoc installation
3338
curl -L https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz -o /tmp/pandoc.tar.gz
3439
mkdir -p /usr/local/pandoc
3540
tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local/pandoc/
3641
rm -f /tmp/pandoc.tar.gz
37-
fi
3842

39-
/usr/local/pandoc --version
43+
else
44+
echo "Unsupported architecture: $ARCH" >&2
45+
exit 1
46+
fi

jupyter/utils/install_texlive.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [[ "$ARCH" == "ppc64le" ]]; then
2424

2525
# Configure, build, install
2626
../texlive-20250308-source/configure --prefix=/usr/local/texlive
27-
make -j$(nproc)
27+
make -j"$(nproc)"
2828
make install
2929

3030
# Symlink for pdflatex
@@ -36,9 +36,8 @@ if [[ "$ARCH" == "ppc64le" ]]; then
3636

3737
export PATH="/usr/local/texlive/bin/powerpc64le-unknown-linux-gnu:$PATH"
3838
pdflatex --version
39-
fi
4039

41-
if [[ "$ARCH" == "x86_64" ]]; then
40+
elif [[ "$ARCH" == "x86_64" ]]; then
4241
# tex live installation
4342
echo "Installing TexLive to allow PDf export from Notebooks"
4443
curl -L https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz -o install-tl-unx.tar.gz
@@ -47,5 +46,10 @@ if [[ "$ARCH" == "x86_64" ]]; then
4746
perl ./install-tl --no-interaction --scheme=scheme-small --texdir=/usr/local/texlive
4847
cd /usr/local/texlive/bin/x86_64-linux
4948
./tlmgr install tcolorbox pdfcol adjustbox titling enumitem soul ucs collection-fontsrecommended
49+
50+
else
51+
echo "Unsupported architecture: $ARCH" >&2
52+
exit 1
53+
5054
fi
5155

0 commit comments

Comments
 (0)