Last active
January 28, 2025 05:18
-
-
Save lmlsna/c8dab1759744b02356e74fced8bda5f2 to your computer and use it in GitHub Desktop.
Install `mdcat` from latest source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt install -y git curl openssl libssl-dev pkg-config # need rust v1.83 or better | |
if [[ "$(which rustc)" == "" ]]; then | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
. "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh | |
rustc --version | |
if [[ $? -ne 0 ]]; then | |
echo "Unknown problem installed rust (dependency). Exiting." | |
exit 1 | |
fi | |
fi | |
tmpdir=$(mktemp -d --suffix=.git) | |
cd "$tmpdir" | |
#git clone https://codeberg.org/flausch/mdcat | |
git clone https://github.com/swsnr/mdcat | |
cd mdcat | |
cargo build --release || cargo build --release -Znext-lockfile-bump | |
sudo mv -v target/release/mdcat /usr/local/bin/ | |
cd /tmp | |
sudo rm -r "$tmpdir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment