Skip to content

Commit 20f3c51

Browse files
committed
verbose logging with updated cabal
Signed-off-by: Md. Shafi Hussain <[email protected]>
1 parent c4195f4 commit 20f3c51

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

jupyter/utils/install_pandoc.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,32 @@ ARCH="${UNAME_TO_GOARCH[$(uname -m)]}"
1313
if [[ "$ARCH" == "ppc64le" ]]; then
1414
# Install Pandoc from source
1515
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
16-
dnf install -y cabal-install ghc gmp-devel gcc-toolset-13 git
16+
dnf install -y cabal-install ghc gmp-devel gcc-toolset-13 git jq
1717

1818
source /opt/rh/gcc-toolset-13/enable
1919

2020
# ghc-8.10 has specific path for gcc in settings
2121
sed -i.bak 's|/usr/bin/gcc|gcc|g' /usr/lib64/ghc-8.10.7/settings
22+
23+
cabal user-config init
24+
25+
export HOME=/root
26+
sed -i -e 's/http/https/g' -e 's/-- secure: True/secure: True/g' $HOME/.cabal/config
27+
28+
cabal update
29+
cabal install cabal-install --verbose
30+
31+
# use latest cabal
32+
export PATH=/root/.cabal/bin:$PATH
2233

23-
# Set version
24-
PANDOC_VERSION=3.7.0.2
34+
PANDOC_VERSION=$(curl -s "https://api.github.com/repos/jgm/pandoc/releases/latest" | jq -r '.tag_name')
2535

36+
cd /tmp
2637
git clone --recurse-submodules https://github.com/jgm/pandoc.git
2738
cd pandoc
2839
git checkout ${PANDOC_VERSION}
2940
git submodule update --init --recursive
3041

31-
export HOME=/root
32-
# Initialize cabal user config (don't fail if already done)
33-
cabal user-config init
34-
3542
# Modify config
3643
sed -i -e 's/http/https/g' -e 's/-- secure: True/secure: True/g' $HOME/.cabal/config
3744

0 commit comments

Comments
 (0)