Last active
June 6, 2024 18:26
-
-
Save pmolodo/ebbcda4b775c931c0fc3e56040cfabed to your computer and use it in GitHub Desktop.
Installing stgit / stg / stackedgit from source (because ubuntu package is way out of date - 0.19)
This file contains 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 | |
set -e | |
set -u | |
# install rust | |
if ! which cargo >/dev/null 2>&1 ; then | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
fi | |
# install other build pre-reqs | |
# ...if you don't want to build/install docmentation, you can omit `xmlto` | |
sudo apt-get install libssl-dev xmlto | |
# if you don't want to install documentation, you can skip this - may not be | |
# needed if you're using the system python | |
if ! python -m "import asciidoc" > /dev/null 2>&1 ; then | |
pip install asciidoc | |
fi | |
# where you want to clone the stgit source repo to | |
repo_parent=/src/_external | |
# where you want to install to | |
stgit_install_prefix=~/.local | |
if ! [ -d "${repo_parent}/stgit" ]; then | |
mkdir -p "${repo_parent}" | |
cd ${repo_parent} | |
git clone https://github.com/stacked-git/stgit.git | |
fi | |
cd "${repo_parent}/stgit" | |
# if you don't want to install everything, you can instead use these targets: | |
# - install | |
# - install-man | |
# - install-completion | |
# - install-html | |
make "prefix=${stgit_install_prefix}" install-all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment