Skip to content

Instantly share code, notes, and snippets.

@gschizas
Last active November 28, 2018 15:27
Show Gist options
  • Save gschizas/3dbc1aef1b07a2f23b945245691d646c to your computer and use it in GitHub Desktop.
Save gschizas/3dbc1aef1b07a2f23b945245691d646c to your computer and use it in GitHub Desktop.
Build and install latest version of nano text editor
#!/usr/bin/env sh
set -o errexit
set -o nounset
ver=$(git ls-remote --tags https://git.savannah.gnu.org/git/nano.git/ | grep '[0-9]$' | tail -1 | cut -d '/' -f 3)
ver2=$(echo $ver|cut -c2-)
ver3=$(echo $ver|cut -c2-2)
curl -O https://www.nano-editor.org/dist/v$ver3/nano-$ver2.tar.gz
tar xzf nano-$ver2.tar.gz
cd nano-$ver2
./configure
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment