Skip to content

Instantly share code, notes, and snippets.

@maddouri
Last active July 27, 2019 20:30
Show Gist options
  • Save maddouri/bab2f44d465f2049a9068895611238f1 to your computer and use it in GitHub Desktop.
Save maddouri/bab2f44d465f2049a9068895611238f1 to your computer and use it in GitHub Desktop.
Get the latest nightly build of Cling (LLVM-based, interactive C++ interpreter) https://root.cern.ch/cling
#!/usr/bin/env bash
set -eux
this_dir="$(dirname "$(readlink -f "$0")")"
# TODO replate 'ubuntu.*18' by a regex that matches your distro
# check https://root.cern.ch/download/cling to see what distros are supported
latest_archive="$(w3m https://root.cern.ch/download/cling | grep -u 'ubuntu.*18' | head -n1 | sed 's/\s\+/ /g' | awk '{print $3}')"
latest_url="https://root.cern.ch/download/cling/${latest_archive}"
wget -O "${this_dir}/${latest_archive}" "${latest_url}"
install_dir="${this_dir}/cling"
mkdir -p "${install_dir}"
tar xvjf "${this_dir}/${latest_archive}" -C "${install_dir}" --strip-components 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment